Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make CursorToXML don't change values with accents
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01491456
Message ID:
01491473
Views:
44
Yes, this seems to work
INSERT INTO temp VALUES ('Ènon, 12')
BROWSE
=MESSAGEBOX(CURSORTOXML('temp','lcData',1,1+2+4+8+48,0,''))
MESSAGEBOX(lcData)
=MESSAGEBOX(CURSORTOXML('temp','lcData',1,1+2+4+8+48 + 16,0,''))
MESSAGEBOX(lcData)
Wondering why we didn't use this flag. I'll add it.

>>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"'
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform