Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UTF-8 file creation
Message
De
27/08/2010 11:45:55
 
 
À
27/08/2010 11:32:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01478595
Message ID:
01478893
Vues:
43
No I've left my Fcreate,Fputs and Fclose as it was except I've used your STRCONV suggestion. But that file while it may have utf-8 encoded content is not marked as such

So afterwards I read the whole file into a string using FILETOSTR and then rewrite it using

STRTOFILE(lcencodedcontent,lcfilename,4)

this output file then is marked as UTF-8 encoded




>>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
>>
>
>Nick, taking in account what Rick suggested, are you using something like this?
>
>#define UTF8BOM	(CHR(0xEF) + CHR(0xBB) + CHR(0xBF))
>* or
>* #define UTF8BOM	""
>
>m.lnFile = FCREATE("output.xml")
>
>FPUTS(m.lnFile,UTF8BOM + '<?xml version="1.0" encoding="UTF-8" ?>')
>FPUTS(m.lnFile,'<docRoot><docTree /></docRoot>')
>FCLOSE(m.lnFile)
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform