Charteditor does not show correct unicode characters

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
MMKPI
Newbie
Newbie
Posts: 2
Joined: Tue May 15, 2007 12:00 am

Charteditor does not show correct unicode characters

Post by MMKPI » Mon Jun 01, 2009 9:17 pm

Hi,

I am using Delphi 2009 and TeeChart Pro 8.04. When I set the language
using e.g. TeeSetChinese the characters are not in Chinese (only strange characters are shown) for the tabs and buttons in the charteditor. However the series title is displayed correctly in Chinese in the charteditor. It works perfectly for e.g German and French, but not for Chinese, Greek and Japanese. Are there any unicode settings (or fonts) that I have missed for the charteditor? The Chinese characters are fine in the main program itself.

Thanks,

Thomas[/img]

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue Jun 02, 2009 3:22 pm

Hi Thomas,

Could you please check if the file teechinese.pas shows correct texts for you?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Post by Tom-SE » Tue Jun 02, 2009 8:09 pm

Hi Yeray,

It seems that teechinese.pas (and all other language files) are recognized as ansi type in Delphi (or e.g by Notepad). I can open the file using e.g. Word. Word will then ask for the coding and choosing "Chinese traditional (Big5)" will display chinese charaters correctly in Word.

Could it be that the utf8 bom is missing in the beginning of the file? Or should the files have been saved in unicode format instead of ansi from the beginning?

Note that I get the same error in your compiled example Tee8New.exe that I downloaded.

Thanks,
Thomas

Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Post by Tom-SE » Tue Jun 02, 2009 8:25 pm

Actually, TeeChinese.pas works (displays correct letters) if the UTF-8 bom sequence EF BB BF is added to the beginning of the file...

Thomas

Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Post by Tom-SE » Wed Jun 03, 2009 8:59 am

[Actually, TeeChinese.pas works (displays correct letters) if the UTF-8 bom sequence EF BB BF is added to the beginning of the file...]

Comment and clarification: The above was obtained by importing TeeChinese.pas into Word and choosing encoding "Chinese traditional (Big5)". After this, copy all text in the word document and paste it into Notepad and save as utf8. Open this file in Delphi 2009 and Chinese characters will be displayed correctly.

/Thomas

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Jun 03, 2009 9:28 am

Hi Thomas,

It seems that using the ANSI TeeChinese.pas the characters aren't displayed correctly. I've opened the file with notepad in our korean machine and saved as UTF-8 and then I've used it (I've removed previous dcus and compiled versions of the file) and now the editor looks fine.

Could you please try it?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Post by Tom-SE » Wed Jun 03, 2009 10:08 am

Hi Yeray,

I guess this will be the same as importing it into Word and then copy-paste into Notepad and save it in utf-8. I did this with Chinese, Japanese, Russian, Greek and it looks good.

It would be nice if you could distribute all files (at least those dealing with international characters) in utf-8 instead of in ansi. After this, compiled programs with Delphi 9 (which reads both ansi and utf-8 source files) and TeeChart will be "unicodified" all the way and show correct text on every PC (no change of language/region required).

Thanks,
Thomas

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Jun 03, 2009 12:15 pm

Hi Thomas,

Yes, this is a known problem that should be solved with v9. The problem comes when those files are modified through different programs and from different machines so we don't control directly if they are saved as utf or ansi.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Tom-SE
Newbie
Newbie
Posts: 10
Joined: Tue Nov 04, 2008 12:00 am

Post by Tom-SE » Thu Jun 04, 2009 2:44 pm

Ok, thanks Yeray.

I guess a quick solution for users (until ver 9 comes with a fix) would be to open the language files in e.g. Word and choose correct encoding for each language, and copy/paste the text in Notepad and save as UTF-8.

Best regards,
Thomas

Post Reply