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