General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only