Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML - ISO8859-1 or ISO8859-2
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01059483
Message ID:
01076950
Vues:
22
Hi Martin

I have output a file (using ISO-8859-2) and a file in ISO-8859-1 is required Is this much different from Windows -1252 and what neeeds to be done to convert form Windows 1252 to ISO-8859-1 ?

Thanks for your help.

Regards,
Gerard



>Hi Gerard,
>
>VFP don't support these code pages...
>You must generate XML directly.
>
>
>* Very simple converting functions from Win1250 to ISO-8859-2
>* Get Code table
>LOCAL lcCT
>=GetCTWIN2ISO(@lcCT)
>* Covert Win1250 to ISO
>?WIN2ISO("Any czech string. Nějaký český text.",lcCT)
>
>
>***********************
>* ISO-8859-2 to WIN 1250
>***********************
>PROCEDURE GetCTISO2WIN(lcCT)
>*@lcCT - code table
>
>lcCT=""
>FOR lii=1 TO 255
>    lcCT=lcCT+CHR(lii)
>NEXT
>
>lcCT=STUFF(lcCT,0xB5,1,CHR(0xBE))
>lcCT=STUFF(lcCT,0xBE,1,CHR(0x9E))
>lcCT=STUFF(lcCT,0xAE,1,CHR(0x8E))
>lcCT=STUFF(lcCT,0xBB,1,CHR(0x9D))
>lcCT=STUFF(lcCT,0xAB,1,CHR(0x8D))
>lcCT=STUFF(lcCT,0xB9,1,CHR(0x9A))
>lcCT=STUFF(lcCT,0xA9,1,CHR(0x8A))
>lcCT=STUFF(lcCT,0xA5,1,CHR(0xBC))
>ENDPROC
>
>
>* WIN 1250 to ISO-8859-2
>***********************
>PROCEDURE GetCTWIN2ISO(lcCT)
>*@lcCT - Code table
>
>LOCAl lcCT
>lcCT=""
>FOR lii=1 TO 255
>    lcCT=lcCT+CHR(lii)
>NEXT
>
>lcCT=STUFF(lcCT,0xBE,1,CHR(0xB5))
>lcCT=STUFF(lcCT,0x9E,1,CHR(0xBE))
>lcCT=STUFF(lcCT,0x8E,1,CHR(0xAE))
>lcCT=STUFF(lcCT,0x9D,1,CHR(0xBB))
>lcCT=STUFF(lcCT,0x8D,1,CHR(0xAB))
>lcCT=STUFF(lcCT,0x9A,1,CHR(0xB9))
>lcCT=STUFF(lcCT,0x8A,1,CHR(0xA9))
>lcCT=STUFF(lcCT,0xBC,1,CHR(0xA5))
>ENDPROC
>
>********************************************
>*
>*********************************************
>PROCEDURE ISO2WIN(lcString,lcCT)
>RETURN SYS(15,lcCT,lcString)
>ENDPROC
>
>********************************************
>*
>*********************************************
>PROCEDURE WIN2ISO(lcString,lcCT)
>RETURN SYS(15,lcCT,lcString)
>ENDPROC
>
>
>
>>Hi.
>>I need to export an XML file which has an encoding ='ISO-8859-1' OR 'ISO-8859-2'
>>
>>I cant see any refernce to this on the documentation... what exactly is this and can I specify theio encosing anywhere in tje CursorToXml command ?
>>
>>Regards,
>>
>>Gerard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform