Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug: CursorToXML(..., ..., ..., 48) ignores default locale
Message
From
07/08/2002 07:42:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
Bug: CursorToXML(..., ..., ..., 48) ignores default locale
Miscellaneous
Thread ID:
00686954
Message ID:
00686954
Views:
96
I am using VFP7 SP1 English version,
Version() = "Visual FoxPro 07.00.0000.9465 for Windows"
CPCurrent() = 1251
CPCurrent(1) = 1251
Windows 2000 Pro, SP2

If you set the Encoding flag (Bits 4 and 5 of nFlags parameter) to 48 it converts to UTF-8 encoding. However the conversion is not done from Windows-1251 character set (which is my current OS default locale) but from Windows-1252. So that all cyrillic characters became western european accented letters.
Moreover I am not sure whether it is a good design, to ignore your default locale when you do not specify encoding (encoding flag = 0) and to set the encoding of the output XML to Windows-1252.

Better will be to not ignore your default locale.
According to me the following two commands should produce the same results:
CursorToXML(0, 'lcResult', 1, 32, 0, "")
lcResult = Strconv(lcResult, 9)
CursorToXML(0, 'lcResult', 1, 48, 0, "")
But if your default locale is different than western european one, they do not. And the first one is the correct one - it is rendered in the browser with the same data as in the table.

I will post this to Visual FoxPro wish list.

Anyone comments about this? Also if anyone has a IVFPXML COM implementation and wants to share it, I will be thankful a lot.
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Next
Reply
Map
View

Click here to load this message in the networking platform