Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Latinic and cyrilic letters in file
Message
From
30/11/2021 07:58:08
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/11/2021 04:30:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01682865
Message ID:
01682868
Views:
59
>I need to write (among others data) from form method with fputs rows in file with latinic and cyrilic letters in same row, for example (utf8 of course)
>
>THIS IS SAMPLE ŠĐČĆĆ ШЂЧЋЖ
>
>I tried but in file occurs ???? for cyrilic letters and some strange letters in output file.
>
>Can you help me with this problem?

For latinic parts,
strconv(strconv("tpšđčć",1),9,1250,1)

for cyrillic parts (assuming they were in codepage 1251),
strconv(strconv("ђшпњ",1),9,1251,1)

You can't have both of 1250 and 1251 in the same field in a table, or same control onscreen. But if these are coming from different sources, this is a way to output them as UTF-8.
Before writing anything into the output file, prefix it with a proper BoM (byte order mark):
FWRITE(nHandle, 0hEFBBBF)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform