Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Russian Language
Message
From
19/09/2016 07:07:27
 
 
To
19/09/2016 07:00:00
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01640876
Message ID:
01641048
Views:
51
>>>>>>>Hi all, I have this problem :
>>>>>>>
>>>>>>>I set windows 10 with Russian language and loaded the russian keyboard
>>>>>>>
>>>>>>>I Can write a string in foxpro table and read it correctly on screen. No problem also with report.
>>>>>>>The problem is when I try to write this string in a text file. It appears with different characters and it is a problem as I send this file to an android device to be showed on a TV
>>>>>>>
>>>>>>>here is the Russian string : ОШИБКА ПЕЧАТИ БИЛЕТОВ
>>>>>>>
>>>>>>>and that's what appears in my text file : ÎØÈÁÊÀ ÏÅ×ÀÒÈ ÁÈËÅÒÎÂ
>>>>>>>
>>>>>>>I got the same now when I copied and pasted the string using the Italian setting keyboard. I succeed in pasting the right string by setting the keyboard as Russian
>>>>>>>
>>>>>>>What can I do to get rid of this problem ?
>>>>>>>
>>>>>>>thank you
>>>>>>>
>>>>>>>Alessio
>>>>>>
>>>>>>You should set Current Language for Non-Unicode programs to Russian too.
>>>>>
>>>>>Yes You are right
>>>>>I realized that despite of what I supposed, I haven't set Russian as windows main language
>>>>>Now it works
>>>>>
>>>>>But is there a way to leave my language as windows language and work with russian strings ?
>>>>>
>>>>>thank you
>>>>>Alessio
>>>>
>>>>Alessio,
>>>>
>>>>>>>The problem is when I try to write this string in a text file. It appears with different characters
>>>>To have the Russian chars of the text file displayed correctly you will need to
>>>>
>>>>(1) Write a byte order mark at the beginning of the file
>>>>(2) Append the (Russian) chars to the file in the format that the BOM ( byte order mark ) indicates
>>>>
>>>>Then windows ( eg notepad) will, display the chars correctly
>>>>
>>>>eg
>>>>(1) Use the UTF-8 BOM - UTF-8 Byte Order Mark (BOM) EF BB BF
>>>>(2) Convert the strings to UTF-8
>>>>
>>>>&& 1251 Cyrillic : Russian alphabet
>>>>&& 1252 Latin I : Western Europe – includes Scandinavia
>>>>output = Strconv(input, 9, 1251, 1)
>>>>
>>>
>>>This'll not work. He should do what Borislav said. I use turkish language which is not in 857 ASCII char set. I have to do set turkish for non-unicode applications. Alessio either should do this for russian.
>>>Because VFP is a non-unicode compatible application. Also notepad is a non-unicode compatible application.
>>
>>I'm sure it will work - remember that windows is using Unicode since windows 95 - including Notepad
>>
>>If notepad sees a BOM it knows how to handle the rest of the bytes of the text file. It's only when there's no BOM that windows reverts to Borislav's solution
>>
>>But then, Borislav's solution only handles one possibility - Alessio will have to switch between codepages 1251 and 1252 whereas the BOM ( per text file) handles any language ( or better codepage )
>
>I didn't know notepad supports unicode...

It does

Start notepad, type a few chars and do 'Save As'

Under encoding you will see

If you save with Unicode encoding, you will see the BOM with a hex editor
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform