Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best practice question: How to map Int'l chars in code
Message
 
To
09/01/2007 11:09:13
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01181408
Message ID:
01184087
Views:
22
Well done Ramil,

But how the heck did you figure out these steps?

Anyway I now know the steps thanks to you.

Ragards

Mathias

>Thank you Mathias.
>
>I've found a way to type in the characters as they are represented in the table. These were the steps I did:
>
>1. Add the additional IME to the Regional Settings in Windows.
>2. Open the On-Screen Keyboard (Accessories->Accessibility)
>3. In VFP, use a CONFIG.FPW with CODEPAGE=1251 when I want to type in Turkish character to the program file. Restart VFP and use CODEPAGE=1254 when I want to type in Russian characters.
>4. In the application, set _VFP.FONTCHARSET = 162 (combined with the CONFIG.FPW) to see the Turkish characters and 204 for the Russian characters.
>
>NOTE: The characters displayed in the program file will not look the same as the one in the grids as they will be the data representation, not the display version.
>
>
>>I don't know if this help at all, but I have a translation program but unlike what you are doing, translating in code, I have all the chars for the different languages in tables. Foxpro will store tham correctly and they appear fine.
>>
>>My code just finds them and uses them accordingly.
>>
>>Mathias
>>>Hi all,
>>>First of, Happy New Year to all.
>>>
>>>Now, my question: What is the best practice on mapping international characters in code?
>>>
>>>Problem: We have a program that creates an XML file output. As such, international characters have to be transformed to its equivalent in &#xxx; format. We hard-code each character that we wanted to transform. However, the more complex characters like Й (cyrillic) or Ğ (turkish) doesn't show properly in the VFP editor. The formatting code looks like this:
>>>
>>>xmlText = strtran(xmlText, 'ç', 'ç') && small c with cedilla
>>>*edited: UT converted the code; the 3rd parameter is "& # 2 3 1 ;" without the spaces.
>>>
>>>I cannot type in the two characters listed above in the second parameter of the strtran() function inside the VFP editor. I've tried setting: _screen.FontCharSet = 162 for Turkish and 204 for Russian and used the Windows On-Screen keyboard to type it in but the literal text Й (cyrillic) or Ğ (turkish) does not display properly.
Mathias Banda

Time is longer than a rope.
Previous
Reply
Map
View

Click here to load this message in the networking platform