Input a chinese in IDE,but only display half in code editer lazarus / 9-Editor ---------------------------------------------------------------------- sunstone · 2009-01-23 10:08 Hi, I input a chinese in code editer,but I found that it only display half a chinese. A chinese must include two chars,only the first char displayed. for example : showmessage('hello word');//你 the char 你 only display half,how to display the whole chinese? system: win xp chinese lazarus:0.926 ---------------------------------------------------------------------- Martin_fr · 2009-01-23 23:54 Hi, unfortunately this is a known issue. There is not yet a solution for it in near time. However a workaround/hack is attached to the following issue http://bugs.freepascal.org/view.php?id=11819 ---------------------------------------------------------------------- sunstone · 2009-01-24 00:56 :'(unfortunately,this problem is't still solved now.I found the reason comes from SYNEDIT. So,it is necessary to solve it as soon as possible.Development of Lazarus deeply affected by this problem in Asia,I think. I really wish Lazarus having a happy future!I will try my best to do anything for Lazarus. ---------------------------------------------------------------------- Martin_fr · 2009-01-24 15:18 Which part did not work? 1) Where you able to apply the patch / Compile Lazarus with the patch applied? 2) Did you compile with "-d DoubleChrWidthHack" OR remove the $IFDEF from the patch? which version are you using? a) 0.9.26 b) daily snapshot (which revision / date) c) SVN checkout ---------------------------------------------------------------------- rabbit · 2009-01-25 13:35 The problem happened in version 0.9.26,and in version 0.9.24 this isn't a problem.   But I found another problem:in version 0.9.24,if you put a component that has the dragkind property into the form,when you run your compiled appliction and click on the component,there would be an error:'divided by zero.'this time it isn't a problem in version 0.9.26. ---------------------------------------------------------------------- Martin_fr · 2009-02-11 00:17 A fix has been applied to SVN. This should be available in tomorrows Daily-Snapshot. (Snapshot from 12th Feb 2009 or later) If anyone still has some Chars half painted only, or any other issue with the fix: Please provide feedback at http://bugs.freepascal.org/view.php?id=11819 (or open a new bug, if this one has been closed) If you have Chars being cut off, please provide the UTF-8 Code for those Chars. Thanks ---------------------------------------------------------------------- Vincent Snijders · 2009-02-11 08:47 The revision number is part of the snapshot file name. If Martin give the revision number in which the fix was committed, it should be possible to see if it is in the 11 February's snapshot or not. ---------------------------------------------------------------------- Ñuño_Martínez · 2009-02-11 09:57 Quote from: sunstone on January 24, 2009, 01:56:20 amSo,it is necessary to solve it as soon as possible.Development of Lazarus deeply affected by this problem in Asia,I think. Not only for Asia. A lot of other countries are affected. I.e. I'm Spanish and when I write:Code: [Select]{ Índice de la canción. } I get Code: [Select]{ 'Indice de la canci'on. } Anyway, Synedit is able to render UNICODE characters. I know it because I've opened sources created by gVim using UTF-8 and there's no problem with them. ---------------------------------------------------------------------- Martin_fr · 2009-02-11 12:23 The revision is 18633, and it is (will be) only included on the 12th. @Ñuño_Martínez: What you describe is a slightly different bug. Please open a new bug on mantis, and provide/attach a sample file containing such text. - Maybe also provide the key sequence needed to type such text - Which OS? What you are experiencing is, that in UTF8 a single char (such as an accented, umlauted or similar char) can be stored as a sequence of 2 CodePoints. In that case Lazarus would display the char and an empty space behind the char. (Actually the empty/space would display at the end of the highlight token/ at the next change of color/style) The fact that you get 2 chars displayed, may also indicate that there is a bug with the input, and that Lazarus stores the wrong text. (in which case the display would be right) Can you please test: Use another (UTF8 capable) Editor, Edit you text and put the desired ó there, save it, open it in Lazarus, and see what the result is? Thanks ---------------------------------------------------------------------- theo · 2009-02-11 12:54 I think Ñuño's problem is different and has to do with dead keys : http://bugs.freepascal.org/view.php?id=9755 ---------------------------------------------------------------------- Vincent Snijders · 2009-02-11 12:58 Quote from: Martin_fr on February 11, 2009, 01:23:19 pmThe revision is 18633, and it is (will be) only included on the 12th. I disagree. All snapshots on http://www.hu.freepascal.org/lazarus/ have r18633 or later. ---------------------------------------------------------------------- Ñuño_Martínez · 2009-02-13 12:13 Quote from: Martin_fr on February 11, 2009, 01:23:19 pm(...) - Maybe also provide the key sequence needed to type such text - Which OS? (...) Can you please test: Use another (UTF8 capable) Editor, Edit you text and put the desired ó there, save it, open it in Lazarus, and see what the result is? The key sequence is [acute] then [vocal]. I've used Windows and Linux both with same problem. I use gVim a lot, even to edit Pascal sources, and I save files using UTF8. Lazarus loads and renders all these files correctly. Quote from: theo on February 11, 2009, 01:54:48 pmI think Ñuño's problem is different and has to do with dead keys : http://bugs.freepascal.org/view.php?id=9755Not sure if it's the same bug. I'll see it carefully when I back home on Wednesdey, then I'll open a bug if necessary. ---------------------------------------------------------------------- theo · 2009-02-13 13:38 Quote from: Ñuño_Martínez on February 13, 2009, 01:13:52 pmI'll see it carefully when I back home on Wednesdey, then I'll open a bug if necessary. Maybe your case is already reported. Check this and relationsships: http://bugs.freepascal.org/view.php?id=7742 ---------------------------------------------------------------------- Ñuño_Martínez · 2009-02-19 11:48 Quote from: theo on February 13, 2009, 02:38:20 pmMaybe your case is already reported. Check this and relationsships: http://bugs.freepascal.org/view.php?id=7742 Yes: that's the bug.