Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make CursorToXML don't change values with accents
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01491456
Message ID:
01491465
Vues:
89
This message has been marked as the solution to the initial question of the thread.
>Hi everybody,
>
>I have a field with 'Énon, 12' in it. When I use CursorToXML, it gets changed to Énon, 12
>
>What can I do to preserve the original text?
>
>Thanks in advance.


From help (for nFlags):


16 10000

Output encoding. Output is set to the cursor code page.

To ensure accurate character translation, the Visual FoxPro default code page must match the code page of the cursor. You can accomplish this by setting character and memo fields in the cursor to NOCPTRAN (character binary/memo binary).

When setting this value with tables using any of the code pages, the encoding attribute in the XML is set to an empty string (""). To change to the correct encoding attribute, use the STRTRAN( ) function.

For example, for code page 936, provide the following to the resulting XML string:
strxml=STRTRAN(strxml, 'encoding=""', 'encoding="gb2312"'
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform