Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UTF-8 file creation
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01478595
Message ID:
01478768
Views:
78
Thanks Rick

worked a treat.

I added a filetostr and a strtofile to the end of the existing process to convert the filemarker to utf-8

Nick


>Nicholas,
>
>There are two components to make a file UTF-8:
>
>* The actual content has to be UTF-8 encode (STRCONV(txt,9))
>* The file has to have a byte order mark
>
>The BOM is a value that preceeds the file content and it's a hint for any editor/file reader to detect the encoding of the file. If the BOM is missing many tools will open the file as locale-default ANSI text.
>
>The UTF-8 prefix is:
>
>
>
>The easiest way to get the BOM into the document is to generate your string then use STRTOFILE(utf8EncodedContent,file,4). The last parameter writes the UTF-8 BOM for you. Note that the encoding parameters are new in VFP 9 I believe...
>
>Hope this helps,
>
>+++ Rick ---
>
>
>>HI
>>
>>I'm creating a file using FCREATE etc .
>>
>>The files contents are some XML
>>
>>The recipient wants it in UTF-8 format.
>>
>>how do I ensure that the file I create is in that format .
>>
>>Nick
Previous
Reply
Map
View

Click here to load this message in the networking platform