SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Japanese characters displaying on their sides

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
itibira



Joined: 09 Mar 2006
Posts: 7

PostPosted: Fri Jul 28, 2006 7:55 pm    Post subject: Japanese characters displaying on their sides Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Sun Jul 30, 2006 4:28 pm    Post subject: Reply with quote

Hello,

May be incorrect Charset specified for Japanese language?
Back to top
View user's profile Send private message
itibira



Joined: 09 Mar 2006
Posts: 7

PostPosted: Mon Jul 31, 2006 2:17 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Mon Jul 31, 2006 3:51 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
itibira



Joined: 09 Mar 2006
Posts: 7

PostPosted: Thu Aug 17, 2006 6:22 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Aug 17, 2006 7:29 pm    Post subject: Reply with quote

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" Smile 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.
Back to top
View user's profile Send private message
many



Joined: 16 Aug 2006
Posts: 6

PostPosted: Fri Aug 18, 2006 5:00 pm    Post subject: Japanese character turns 90 deg CCW Reply with quote

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.
Back to top
View user's profile Send private message
itibira



Joined: 09 Mar 2006
Posts: 7

PostPosted: Sat Aug 19, 2006 3:11 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Mon Aug 21, 2006 7:31 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Mon Aug 21, 2006 7:41 am    Post subject: Re: Japanese character turns 90 deg CCW Reply with quote

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)

Quote:

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_support_for_far_east_or_other_unicode_languages.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.

Quote:
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.
Back to top
View user's profile Send private message
itibira



Joined: 09 Mar 2006
Posts: 7

PostPosted: Mon Aug 21, 2006 9:45 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
many



Joined: 16 Aug 2006
Posts: 6

PostPosted: Mon Aug 21, 2006 3:25 pm    Post subject: Japanese characters Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group