Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UTF-8 file creation
Message
From
27/08/2010 10:56:10
 
 
To
27/08/2010 10:16:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01478595
Message ID:
01478873
Views:
42
Hi Antonio.

In my case all I know is that the (very precise) Germans at the other end my data feed are telling me that mine is not a UTF-8 file.

Nick

e
>I'm a bit puzzled here. The need for the prefix depends on the application that will consume the file. Some may require it, others will just consider it and others still may nag at it. Perhaps this is a case in which the prefix is mandatory. Nevertheless, by UNICODE standards the BMO in UTF-8 files is optional - which is quite understandable - and I have yet to find an XML parser or editor that will not comply with the encoding stated in the XML declaration (that's the purpose of it!).
>
>In any case, shouldn't the prefix be left out of the STRCONV()? Otherwise, it will be converted to UTF-8 also, thus failing the intended goal of signaling the file encoding.
>
>>>Hi Antonio
>>>
>>>I think in my case its the file not the content.
>>>
>>>The contents if the file do seem to be UTF-8 but the recipient is telling me the file is not UTf-8
>>
>>You need a prefix, so then even notepad will know to expect UTF-8
>>
>>
>>STRCONV(STRCONV(0hfffe+m.lcFileContent,1),9)
>>
>>Or what Rick said, which is the simpler way to do this.
>>
>>>>
>>>>STRCONV(STRCONV(m.lcFileContent,1),9)
>>>>
>>>>
>>>>will encode your output in UTF-8.
>>>>
>>>>>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
Next
Reply
Map
View

Click here to load this message in the networking platform