Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-06

0.925 editor of the Chinese characters overlap

28 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

peng

I now use Lazarus 0.925 (2008-5-30) version, it's feeling better than 0.924. But there is a regret that, in the editor, type the Chinese characters will be crowded together. 2 characters position, showed that about 3~4 characters. I will try to change the font editor, has not improved.

In addition, the Object Inspector, property type Chinese, will appear as a number of question marks,like:' ????? '. Hope that the official version solve this problem. Need a screenshot ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080623/a36d60a1/attachment.html

Reply by email

Felipe Monteiro de Carvalho
to peng

What is you operating system?

What is you compiler version? Unicode support is only available with Free Pascal 2.2.1+

A screenshot would be nice, and also some chinese text that we can play with. I cannot type chinese with my keyboard.

Maybe there is a bug in SynEdit for languages encoded in more then 2 bytes. Or maybe you need to set it to use a better font. The Object Inspector should work with chinese at the moment, afaik.

Felipe Monteiro de Carvalho

Reply by email

Felipe Monteiro de Carvalho
to Mattias Gärtner

Here (Mac OS X, svn lazarus, fpc 2.2.0) the object inspector works perfectly for some Japanese text I copy+pasted

???

In SynEdit I still need to find a monospace font that will show them at all ....

Felipe Monteiro de Carvalho

Reply by email

peng
to Felipe Monteiro de Carvalho: What is you operating system? What is you compiler version? Unicode support is only…

thank you! my OS is windows XP in Chinese. the fpc version is 2.2.3 in lazarus 0.925 2008-5-30.

Screenshot has two parts, at the top, 0.924, the Chinese normal; below, 0.925, the Chinese overlap.
Six Chinese characters are: "??????".
More Chinese characters can get from my blog :)
http://pengtu.net/wp2/pc/lazarus-faq

2008/6/23 Felipe Monteiro de Carvalho :

Show quoted text 7 lines
A screenshot would be nice, and also some chinese text that we can play with. I cannot type chinese with my keyboard. Maybe there is a bug in SynEdit for languages encoded in more then 2 bytes. Or maybe you need to set it to use a better font. The Object Inspector should work with chinese at the moment, afaik.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080624/64db83b2/attachment-0001.html -------------- next part --------------
A non-text attachment was scrubbed...
Name: lazarus-925-err-SynEdit-encoding.png
Type: image/png
Size: 20298 bytes
Desc: not available
Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080624/64db83b2/attachment-0001.png

Reply by email

Felipe Monteiro de Carvalho
to peng

Please update your Lazarus, there were very recently fixed to synedit with multibyte.

About the problem with Object Inspector I think there is no problem. Lazarus changed since 0.9.24, wo have moved to unicode support in 0.9.25

All applications which were using Ansi now need to be converted to UTF-8, so you need to convert your LFM files to UTF-8 from whatever encoding you are using today.

thanks,

Felipe Monteiro de Carvalho

Reply by email

peng
to Felipe Monteiro de Carvalho

Really? I just download and install the
Lazarus-0.9.25-fpc-2.2.2rc1-20080623-win32.exe. The default, edit the new unit, Chinese characters still overlap.

Object Inspector in Chinese is still a question mark, as the screen shots in front of the same. Whether to set up what the environment?

In addition, I found sqlite components have been included in the new version, good news!

2008/6/24 Felipe Monteiro de Carvalho :

Show quoted text 6 lines
Please update your Lazarus, there were very recently fixed to synedit with multibyte. About the problem with Object Inspector I think there is no problem. Lazarus changed since 0.9.24, wo have moved to unicode support in 0.9.25 All applications which were using Ansi now need to be converted to UTF-8, so you need to convert your LFM files to

UTF-8 from whatever encoding you are using today.

This new unit has nothing to do with it ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080624/e3b9c0ca/attachment.html

Reply by email

Joost van der Sluis
to peng

Op dinsdag 24-06-2008 om 12:05 uur [tijdzone +0800], schreef peng:

In addition, I found sqlite components have been included in the new version, good news!

There already were sqlite components. You only have to install them.

Now you have two options: sqlite using sqldb, of the more 'native' sqlite3dataset component which you still have to install yourself. (packages -> configure installed packages)

Joost.

Reply by email

Mattias Gärtner
to peng: Really? I just download and install the Lazarus-0.9.25-fpc-2.2.2rc1-20080623-win32.exe.…

Zitat von peng :

Really? I just download and install the Lazarus-0.9.25-fpc-2.2.2rc1-20080623-win32.exe. The default, edit the new unit, Chinese characters still overlap.

They overlap even more.
Synedit only supports monospace fonts (every character has the same width). The bug was, that a 3 byte chinese character was *painted* three times as wide as other characters. But the rest of synedit treated a 3 byte chinese charater correctly as one visible character. So caret position and painted characters were out of sync. This has been fixed.

But:
In all fonts I tried under ubuntu/linux/gtk2 the chinese characters are much wider than the others, so they all look bad in synedit.

I added in svn 15559 the synedit property ExtraCharSpacing. You can set it in the editor options of the IDE. This is merely a workaround, so that it is at least usable. It would be better to extend synedit to support proportional fonts, but this is a big task.

Object Inspector in Chinese is still a question mark, as the screen shots in front of the same. Whether to set up what the environment??

Can you paste some example chinese strings here, so that the windows developers have something to play with?

In addition, I found sqlite components have been included in the new version, good news!

:)

BTW, the IDE can not yet convert files written in 2byte windows codepage. Do you know, if there are actually any sources written in 2byte windows codepage?
If yes, then converter functions must be implemented in lcl/lconvencoding.pas. I can do that if needed.

Mattias

Reply by email

peng
to Mattias Gärtner

Appears to be a big task, but, but, however, why the Chinese show that normal in the 0.924 ? the version on website downloade page, svn-12752.

2008/6/24 Mattias G?rtner :

Show quoted text 6 lines
I added in svn 15559 the synedit property ExtraCharSpacing. You can set it in the editor options of the IDE. This is merely a workaround, so that it is at least usable. It would be better to extend synedit to support proportional fonts, but this is a big task.

Can you paste some example chinese strings here, so that the windows

developers have something to play with?

OK, this is too simple for me! -_-
?? = unit
?? = form
?? = project
? = package

More Chinese words, you can lazarus \ languages \ lazaruside.zh_CN.po found.

:)

Show quoted text 8 lines
BTW, the IDE can not yet convert files written in 2byte windows codepage. Do you know, if there are actually any sources written in 2byte windows codepage? If yes, then converter functions must be implemented in lcl/lconvencoding.pas. I can do that if needed. Mattias

oh, I see that the Chinese translation of 0.925 (menu-> about) than the 0.924 increase, who is the translator?
Some Chinese string, from about dialog:

??: GPL/LGPL

Lazarus????????????????????Free Pascal?????????. Free Pascal???????? Windows, Linux, Mac OS X, FreeBSD???????(L)GPL???Pacal??, ????Pacsal?????.

Lazarus????????????????????????????Delphi??????????, ???IDE????????????, ?????, ????????????????????.

??Lazarus???????, ????????????, ??, ???????!

??'?????'? http://pengtu.net/ooo -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080624/7179ef79/attachment.html

Reply by email

Felipe Monteiro de Carvalho
to peng

I found the Object Inspector / TForm problem.

Our default font isn't capable of showing chinese characters. I don't know how to fix this. Can we change the font in the caption of the form? I'm surprised it doesn't work there, I would think that MS would put a very good font there. Also wierd is that in the screenshot it works in all forms, except in the under design form. Here no form shows chinese characters, and MessageDlg also doesn't show.

Please open bug reports for the problems. 2 bug reports, one for the default font problem and another for the SynEdit problem.

thanks,

Felipe Monteiro de Carvalho

Reply by email

Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho

No, wait ... here it shows squares for the unknown chars, and not question marks. Putting that together with the fact that the other titles are correct I conclude that his system has a chinese-capable default font and the problem either doesn't exist or is something else.

Felipe Monteiro de Carvalho

Reply by email

peng
to Felipe Monteiro de Carvalho

If the developers need Chinese character to test, I can give to his mailbox. File size is about 4 MB ~ 10MB. For example: SIMFANG.TTF and SIMSUN.TTC.

thx?

2008/6/26 Felipe Monteiro de Carvalho :

Show quoted text 6 lines
No, wait ... here it shows squares for the unknown chars, and not question marks. Putting that together with the fact that the other titles are correct I conclude that his system has a chinese-capable default font and the problem either doesn't exist or is something else.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080627/17a4b8a0/attachment.html

Reply by email

Felipe Monteiro de Carvalho
to peng

I already have a chinese-capable font in my system: Arial Unicode MS

I managed to change the default fonts to Arial Unicode MS and it fixes most of the problems, except that I see squares in the Object Inspector. I think we need an option to change the font in the object inspector.

I still think there are 2 possibilities: Either you are somehow putting ISO text into the Object Inspector or there is a bug when inputing the text (but not with copy+paste).

Peng, can you do a test? Please copy+paste some chinese text to the object inspector TForm.Caption and see if it shows correctly in the form?

How do you input chinese?

thanks,

Felipe Monteiro de Carvalho

Reply by email

peng
to Felipe Monteiro de Carvalho: I already have a chinese-capable font in my system: Arial Unicode MS I managed to change…

Oh, I am Chinese, so I used the windows is the Chinese version. OS provide Chinese input method. ^_^

I did the test, copies of Chinese characters to the Object Inspector, edit normal. run normal, also.

If you need the Chinese character for free, you can visit http://wqy.sf.netdownload. If reading difficulties, do not worry, I find are more suitable
for non-Chinese user's guide, wait a bit longer.

Regards!

2008/6/27 Felipe Monteiro de Carvalho :

Show quoted text 18 lines
I already have a chinese-capable font in my system: Arial Unicode MS I managed to change the default fonts to Arial Unicode MS and it fixes most of the problems, except that I see squares in the Object Inspector. I think we need an option to change the font in the object inspector. I still think there are 2 possibilities: Either you are somehow putting ISO text into the Object Inspector or there is a bug when inputing the text (but not with copy+paste). Peng, can you do a test? Please copy+paste some chinese text to the object inspector TForm.Caption and see if it shows correctly in the form? How do you input chinese? thanks,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080627/9c5c21d7/attachment.html

Reply by email

Felipe Monteiro de Carvalho
to peng

2008/6/26 peng :

I did the test, copies of Chinese characters to the Object Inspector, edit normal. run normal, also.

So you copy+paste chinese chars to the Object Inspector, edits them and runs the form and everything is normal?

In that case there is no problem. I think you created the project using Lazarus 0.9.24 and then opened it in Lazarus 0.9.25. That doesn't work because 0.9.25 uses Unicode and 0.9.24 does not, you need to first convert the project to unicode.

So we are left with only the SynEdit problem, which it seams to me would be solved by finding a monospaced chinese font. I tryed to search but found nothing, maybe you will have more lucky then me.

Felipe Monteiro de Carvalho

Reply by email

peng
to Felipe Monteiro de Carvalho

2008/6/27 Felipe Monteiro de Carvalho :

So you copy+paste chinese chars to the Object Inspector, edits them and runs the form and everything is normal?

Yes! edit normal, run normal. in Lazarus 0.925-20080623, creat new unit. OS= windows XP sp3 chinese simple.

I will try more new version snapshot of Lazarus 0.925, and then continue to report.

In that case there is no problem. I think you created the project

Show quoted text 11 lines
using Lazarus 0.9.24 and then opened it in Lazarus 0.9.25. That doesn't work because 0.9.25 uses Unicode and 0.9.24 does not, you need to first convert the project to unicode. So we are left with only the SynEdit problem, which it seams to me would be solved by finding a monospaced chinese font. I tryed to search but found nothing, maybe you will have more lucky then me. -- Felipe Monteiro de Carvalho

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080627/aa38d5cd/attachment.html

Reply by email

peng
to Mattias Gärtner: Zitat von peng : They overlap even more. Synedit only supports monospace fonts (every…

Now the situation is:
Lazarus 0.926 on Windows XP chinese (zh_CN) . Chinese characters overlap in editor,
Temporary solution is here:
Environment?Editor Options??Display?Default editor font? (change other font).

The ScreenPrint can see here: http://pengtu.net/wp2/pc/lazarus-0926-zh

The issue will affect the matter: Chinese notes in code, or some of the Caption, or showmessage string, etc.

thanks

2008/6/24 Mattias G?rtner :

Show quoted text 23 lines
They overlap even more. Synedit only supports monospace fonts (every character has the same width). The bug was, that a 3 byte chinese character was *painted* three times as wide as other characters. But the rest of synedit treated a 3 byte chinese charater correctly as one visible character. So caret position and painted characters were out of sync. This has been fixed. But: In all fonts I tried under ubuntu/linux/gtk2 the chinese characters are much wider than the others, so they all look bad in synedit. I added in svn 15559 the synedit property ExtraCharSpacing. You can set it in the editor options of the IDE. This is merely a workaround, so that it is at least usable. It would be better to extend synedit to support proportional fonts, but this is a big task. BTW, the IDE can not yet convert files written in 2byte windows codepage. Do you know, if there are actually any sources written in 2byte windows codepage? If yes, then converter functions must be implemented in lcl/lconvencoding.pas. I can do that if needed. Mattias

Reply by email

Tommi Prami
to peng

Where I could find the sources, or download/install them. It might be that Nightlies (0.9.27 beta, if I read it correctly, because about-box will crash Lazarus..) don't ship with it (or it don't get installed etc...)

I had some issues with 0.9.26 so I was thinking to test with new beta, but seems that I can't get too far with it :)

Should I get back to Official release, or is there easy way to go around this???

-TP-

Reply by email

Martin Friebe
to peng: Now the situation is: Lazarus 0.926 on Windows XP chinese (zh_CN) . Chinese characters…

Hi,

For the display (Synedit) issue another workaround exists, if you are willing to patch your Lazarus yourself.

The full issue is known under http://bugs.freepascal.org/view.php?id=11819 While it will be unfortunately sometime until I get to do a proper fix for this, a patch is attached to the bug, which allows to view chinese chars.
It seems stable, and worked for the examples I had. If you find more double-wide ranges you can add them easily.

The reason it has not been added to Lazarus as it stands is that the code is a very simple hack. Which would make the maintenance of Lazarus harder for everyone else.

It also has one side effect/bug. The cursor steps in single wide chars. So the cursor can be positioned in the middle of a chinese char, and then may act either as if it was before, or it was after the char.

Regards
Martin

peng wrote 42 lines
Now the situation is: Lazarus 0.926 on Windows XP chinese (zh_CN) . Chinese characters overlap in editor, Temporary solution is here: Environment?Editor Options??Display?Default editor font? (change other font). The ScreenPrint can see here: http://pengtu.net/wp2/pc/lazarus-0926-zh The issue will affect the matter: Chinese notes in code, or some of the Caption, or showmessage string, etc. thanks 2008/6/24 Mattias G?rtner : > They overlap even more. > Synedit only supports monospace fonts (every character has the same width). > The bug was, that a 3 byte chinese character was *painted* three times as wide > as other characters. But the rest of synedit treated a 3 byte chinese charater > correctly as one visible character. So caret position and painted characters > were out of sync. This has been fixed. > > But: > In all fonts I tried under ubuntu/linux/gtk2 the chinese characters are much > wider than the others, so they all look bad in synedit. > > I added in svn 15559 the synedit property ExtraCharSpacing. You can set it in > the editor options of the IDE. This is merely a workaround, so that it is at > least usable. It would be better to extend synedit to support proportional > fonts, but this is a big task. > > > BTW, the IDE can not yet convert files written in 2byte windows codepage. > Do you know, if there are actually any sources written in 2byte windows > codepage? > If yes, then converter functions must be implemented in lcl/lconvencoding.pas. I > can do that if needed. > Mattias >

Reply by email

Vincent Snijders
to Tommi Prami: Where I could find the sources, or download/install them. It might be that Nightlies…

2008/10/28 Tommi Prami :

Show quoted text 5 lines
Where I could find the sources, or download/install them. It might be that Nightlies (0.9.27 beta, if I read it correctly, because about-box will crash Lazarus..) don't ship with it (or it don't get installed etc...) I had some issues with 0.9.26 so I was thinking to test with new beta, but seems that I can't get too far with it :) Should I get back to Official release, or is there easy way to go around this???

What OS do you use? What exact installers (rpm,deb,dmg) did you use?

Vincent

Reply by email

Tommi Prami
to Vincent Snijders

I have Vista 64bit and tried following installers :

- Lazarus-0.9.27-17116-fpc-2.2.3-20081024-win64.exe
- Lazarus-0.9.27-17114-fpc-2.2.2-20081024-win64.exe

Both with same result... Setting (which error message tells me to check is empty)

-TP-

ps. Could there be support for ctrl+c with error/exception dialogs like with Delphi. Easy to cet exact error message like that. Or make dialog to use some component which supports that (flat tmemo-like etc).

Show quoted text 26 lines
-----Original Message----- From: [mailto:lazarus- ] On Behalf Of Vincent Snijders Sent: 28. lokakuuta 2008 13:00 To: General mailing list Subject: Re: [Lazarus] error: free Pascal sources not found (at startup) 2008/10/28 Tommi Prami : > Where I could find the sources, or download/install them. It might be that Nightlies (0.9.27 beta, if I read it correctly, because about-box will crash Lazarus..) don't ship with it (or it don't get installed etc...) > > I had some issues with 0.9.26 so I was thinking to test with new beta, but seems that I can't get too far with it :) > > Should I get back to Official release, or is there easy way to go around this??? What OS do you use? What exact installers (rpm,deb,dmg) did you use? Vincent _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Vincent Snijders
to Tommi Prami

2008/10/28 Tommi Prami :

Show quoted text 7 lines
I have Vista 64bit and tried following installers : - Lazarus-0.9.27-17116-fpc-2.2.3-20081024-win64.exe - Lazarus-0.9.27-17114-fpc-2.2.2-20081024-win64.exe Both with same result... Setting (which error message tells me to check is empty)

I try to find out, if there is something wrong with the packaging.

ps. Could there be support for ctrl+c with error/exception dialogs like with Delphi. Easy to cet exact error message like that. Or make dialog to use some component which supports that (flat tmemo-like etc).

Compile -WC and read the error locations from the console.

Vincent

Reply by email

Tommi Prami
to Vincent Snijders

I downloaded newer version, same results but I actually managed to find correct path for it now :)

Now I see no error...

-TP-

Show quoted text 32 lines
-----Original Message----- From: [mailto:lazarus- ] On Behalf Of Vincent Snijders Sent: 28. lokakuuta 2008 14:59 To: General mailing list Subject: Re: [Lazarus] error: free Pascal sources not found (at startup) 2008/10/28 Tommi Prami : > I have Vista 64bit and tried following installers : > > - Lazarus-0.9.27-17116-fpc-2.2.3-20081024-win64.exe > - Lazarus-0.9.27-17114-fpc-2.2.2-20081024-win64.exe > > Both with same result... Setting (which error message tells me to check is > empty) I try to find out, if there is something wrong with the packaging. > ps. Could there be support for ctrl+c with error/exception dialogs like with > Delphi. Easy to cet exact error message like that. Or make dialog to use > some component which supports that (flat tmemo-like etc). Compile -WC and read the error locations from the console. Vincent _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

peng
to Martin Friebe: For the display (Synedit) issue another workaround exists, if you are willing to patch…

OK, I See, I will tell my friends in my blog.
Thank You.

2008/10/28 Martin Friebe :

Show quoted text 11 lines
Hi, For the display (Synedit) issue another workaround exists, if you are willing to patch your Lazarus yourself. The full issue is known under http://bugs.freepascal.org/view.php?id=11819 While it will be unfortunately sometime until I get to do a proper fix for this, a patch is attached to the bug, which allows to view chinese chars. It seems stable, and worked for the examples I had. If you find more double-wide ranges you can add them easily.

Reply by email