Japanese characters displaying on their sides

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
itibira
Posts: 7
Joined: Thu Mar 09, 2006 10:01 pm

Japanese characters displaying on their sides

Post by itibira »

Hi,

i have noticed that some (not all) of Japanese captions and strings will be displayed on their sides (ie: they are rotated 90 deg. counterclockwise), both in my labels and in the SIL editor. Other Asian captions and strings display correctly both in the labels and the SIL editor, EXCEPT after i have gone first to Japanese and then come back to, say, Simplified or Traditional Chinese in which case the Chinese characters will now also be displayed on their sides.

i am using Tnt forms and labels and if i do not invoke the Japanese translations then all the other languages, including Chinese and Korean display correctly.

What can be causing this and how can i correct this situation?

Thanks in advance.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

May be incorrect Charset specified for Japanese language?
Best regards,
Igor Siticov.
itibira
Posts: 7
Joined: Thu Mar 09, 2006 10:01 pm

Post by itibira »

Hi Igor,

The charset i'm using for the Japanese strings is SHIFTJIS_CHARSET. Most of the Japanese encoded strings display correctly, ie: they are upright and proceed from left to right in the string, but some strings' characters are turned on their sides. However, these strings do proceed correctly from left to right. With the problem labels, it's like the label is set to read vertically but is turned on its side 90 deg counterclockwise (another way to look at it...).

Since this also seems to happen within the SIL Editor (again, only for some labels) i'm baffled as to what's causing this behaviour.

Any ideas?

Thanks again.

norberto
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Since SIL Editor tries to use the Font information specified for controls, I can guess that the "problematic" labels just use different font. Is it so?
Best regards,
Igor Siticov.
itibira
Posts: 7
Joined: Thu Mar 09, 2006 10:01 pm

Post by itibira »

Hi and sorry to take so long to reply. i had to work on something else.

No, the "problematic" labels use the same font but the only difference appears to be the Charset. The translations are for the exactly the same labels on the form and i don't change the font at all. For the Japanese characters, i am using the SHIFT_JIS charset.

i just returned to the problem. i just used the Translation Editor to enter new data into the translations and for Japanese, i am getting the characters on their side still. i do not see this problem for other Asian languages such as Chinese and Korean. They display correctly.

Is this a bug with your software or something i'm doing? Any other ideas? i really need to get this issue resolved please.

Thanks again.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

If I understood correctly the situation is as following:
1. You have Japanese language in your translations
2. For all controls under Japanese language you've set correct charset (SHIFT_JIS) and font
3. Most of the labels show fine themselvs under Japanese but some of them not.
4. You use TTntLabels that support Unicode.

Is it possible that the "problematic" :) labels just have Japanese values tham _must_ be displayed turned on 90 gr.? Because TNTLabel is Unicode it just draw itself using Unicode API as well as SIL Editor (or Translation Editor) does.
Best regards,
Igor Siticov.
many
Posts: 6
Joined: Wed Aug 16, 2006 5:15 pm

Japanese character turns 90 deg CCW

Post by many »

I have exact problem. The initial translated table was in Excel 97 format. There are two columns: English and Japanese. The font was: MS Pゴシック. In Excel they look fine. Once imported into Dictionary Manager, the Japanese characters turn 90deg CCW, same in SIL editor. Is this normal behavior of Dict Manager and SIL Editor? Should Dict Manager and SIL Editor display Japanese characters in the correct orientation? What could be done to fix this?

With the Janese character turns sideway:
In C++ Builder 5, menu, dropdown menu works fine. Meanwhile, labels, status bar, some memo has the characters displayed sideway. I replaced some labels with siLabel, still the problem persists.

I really can use some help here. Since I'm new to TsiLang and do not speak or read Japanese. So I have to look at the character and compare to the original table. Very painful. Thanks in advance.
itibira
Posts: 7
Joined: Thu Mar 09, 2006 10:01 pm

Post by itibira »

To clarify the problem i'm having with the Japanese labels (and Asian text in some instances):

1. In the Tranlation Editor, under the "Captions" table, all the characters, including Japanese and other Asian characters display correctly and they also display correctly in the form at runtime.

2. In the Translation Editor under the "Strings" table, i have all kinds of problems, including Japanese characters displaying on their sides (turned 90 deg CCW) and garbage Chinese, Greek and Korean characters. This is for the SAME TsiLang component.

3. The Charsets and Fonts i am using in both cases are identical. Most of the labels i use are TNT labels but some are not BUT the "Caption" strings display the Asian and Greek characters correctly, even if it is not a TNT label.

4. Even with TNT lables, in the "Strings" section, the Asian and Greek characters are not displayed correctly.

i don't understand the problem here, but would definitely appreciate some constructive feedback.

Thanks again.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

Thank you for detailed explanation!
Could you please check the settings under menu Tools | Default Fonts in Translation Editor? Because since under Captions section everything is working fine and at run-time labels displayed correctly, it looks like under Default Fonts the font configured for Japanese langage is either incorrect or not installed on your OS. Please check this.
When working at run-time with strings defined under "Strings" section and using them with Unicode components like TTntLabel you need to use methods with W suffix. So please check that you use GetTextOrDefaultW() while retrieving strings at run-time. Otherwise there will be performed Unicode to ANSI conversion using default code page.
Please let me know if this helps.
Best regards,
Igor Siticov.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Re: Japanese character turns 90 deg CCW

Post by isiticov »

Hello,
many wrote:I have exact problem. The initial translated table was in Excel 97 format. There are two columns: English and Japanese. The font was: MS Pゴシック. In Excel they look fine. Once imported into Dictionary Manager, the Japanese characters turn 90deg CCW, same in SIL editor. Is this normal behavior of Dict Manager and SIL Editor? Should Dict Manager and SIL Editor display Japanese characters in the correct orientation? What could be done to fix this?
It is very strange that under Dictionary Manager you got incorrect behavior. Since it is 100% Unicode compatible the characters must be displayed correctly. The problem under SIL Editor may reside also with incorrect settings for Default Fonts (please see my reply to itibira)
With the Janese character turns sideway:
In C++ Builder 5, menu, dropdown menu works fine. Meanwhile, labels, status bar, some memo has the characters displayed sideway. I replaced some labels with siLabel, still the problem persists.
TsiLabel is not useful in this case, because it is not Unicode compatible. it is just bonus label with some display effects.

Please check our article at http://www.tsilang.com/press/en/adding_ ... uages.html for additional information.

In short, you need to use Unicode components in order to be able to display English, Western and Far East languages at the same time independent on Default Locale set under Regional Options.
Unfortunately, if I recall correctly the recent version of TNT Controls is not available for BCB5. But you can try to find earlier versions and try it.
I really can use some help here. Since I'm new to TsiLang and do not speak or read Japanese. So I have to look at the character and compare to the original table. Very painful. Thanks in advance.
Please let me know if this was helpful or some problems still remain.
Best regards,
Igor Siticov.
itibira
Posts: 7
Joined: Thu Mar 09, 2006 10:01 pm

Post by itibira »

Hi,

Yes! That was it. It looks like the Default Fonts file was corrupted somehow and changed. i went through and changed the Default Fonts to what they should be and now it works.

Also, thanks on the tip for adding the "W" to the GetTextOrDefault.

Thanks!
many
Posts: 6
Joined: Wed Aug 16, 2006 5:15 pm

Japanese characters

Post by many »

Finally, I got it. I made some change from the Tsilang Expert and Translation Editor. English font: Arial, Japanese:MS P明朝, and character set SHITJIS_CHARSET.
They're fine now. Thank to isitocov and itibria.
Post Reply