Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to design applications in the Chinese language?
Message
 
À
03/05/2006 09:32:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01118425
Message ID:
01119478
Vues:
40
If your application will be run only in DBCS (Chinese) Windows, you may consider using (although I still don't recommend) the "C" version of the string functions (lenc(), leftc(), etc). If your application is to be run in both DBCS Windows and SBCS (English) Windows, don't use the "C" version functions.

The main problem of the "C" version functions is that it may return different results in English Windows and DBCS Windows. For example, Leftc(CHR(169)+CHR(91)+CHR(169)+CHR(120),1), returns Chr(169)+Chr(91) in Chinese Windows while only Chr(169) in English Windows. This can yield wrong calculation results or "corrupt" your table indexes. (I regard this as a design bug. Leftc() should always return Chr(169)+Chr(91), regardless of Windows versions.)

Another problem of the "C" version functions is that under some circumstances, some of them yield a C5 error (unbelievable?).

Our applications are English/Chinese UI switchable (pushing a hotkey) and being run by users in different countries. However we never use any "C" version functions.

My recommendation: don't use functions like leftc(), lenc(), substrc(), etc., unless the Microsoft fixes the bugs.


Ben


>Walter,
>
>I'm interested in the same topic as you are.
>
>Thread#1110111 may have some ideas for you. This thread is relative to Russian but the breakout idea for me was to Anton Oleynic's use the new FontCharSet property to get around some of the limitations discussed in Rick Strahl's paper.
>
>I don't know if the FontCharSet property will apply to double char set text like Chinese.
>
>Here's another article that you may find helpful:
>http://www.stevenblack.com/INTLUsingAsianCharacters.asp
>
>Some other random info from my notes (ALL UNTESTED) on the topic of Chinese and VFP:
>
>SET COLLATE TO PINYIN
>
>Code pages
>936 = Chinese Simplified (PRC, Singapore)
>950 = Traditional Chinese (Hong Kong SAR, Taiwan)
>
>XML attribute "encoding" should be Windows-936 vs. Windows-1252.
>
>Make sure to use double byte versions of string functions LENC(), LEFTC(), etc.
>
>Good luck and please let us know what you find out!
>
>Malcolm
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform