Page 1 of 1

Depends on system code page?

Posted: Tue Mar 09, 2004 12:19 am
by pls
I have a problem and not much time left to solve it.

I'm translating a program so that it will work in both Englich and Greek.
It now works fine when the system locale is set to Greek.

When the system locale is set to English, all the greek text comes out with lots of question marks, like this "???sate t? control menu st? p????aua e?st?????: ?p????te"

I recognize this as what happens when you take Unicode in Greek and do MultibyteToWideChar using an English code page.

It looks like something in tsiLang is doing translations specifying CP_ACP rather than using a code page appropriate to the language.

I just discovered that if I open the internal translator with the system code page set to English that all my Greek strings come out the same way.

How can I make my program appear in Greek or English according to the menu selection, indpendent of the system locale setting?

Posted: Tue Mar 09, 2004 12:24 am
by pls
Neglected to say that all of my Greek specifies GREEK_CHARSET and all my my English text specifies ANSI_CHARSET. Nothing uses the default.

Posted: Tue Mar 09, 2004 6:21 am
by isiticov
In internal Translation Editor in sections like Strings, Dialogs the strings are displayed using font settings specified under menu "Tools|Default Fonts".
Please let us know if this was the problem and that under Captions, Hints and other sections strings were displayed correctly.
Some window controls such as TButton, TGroupBox... are just wrappers of standard window controls and draw themselves using "Desktop Font Settings" and ignore Delphi's Font property. You may take a look at the thread http://www.sicomponents.com/forum/viewtopic.php?p=45#45, it demonstrates some additional info under this subject.

Posted: Wed Mar 10, 2004 9:24 am
by pls
My problems are mostly with the captions on TLabel controls.

Bearing in mind that I am running the same exe on the same system with only the system default locale changed and see Greek in the Greek locale and many question marks in the English locale.

I can also do this: Starting with the system set to Greek, display the internal translator and my captions are Greek. Don't save, change the system locale to English, open the internal translator, and they are question mark garbage.

I'll see what else I can discover tomorrow.

Posted: Wed Mar 10, 2004 11:36 am
by isiticov
This looks really strange. What font settings are used in "Tools|Default Fonts" and in "Fonts" section of TsiLang? Do you use the appropriate font for Greek language? Is it listed in drop-down combe when you click on the grid cell under "Fonts" section in Translation Editor?
FYI: Not all fonts able to support all charsets.