VB strings, MSXML, Latin 9, and the Euro
From: Rod Good (start_monday_at_yahoo.com)
Date: 06/16/04
- Next message: Tom Ogilvy: "Re: Office 2000 Programming with Office 2003"
- Previous message: mudraker: "Re: Copying a column from several similar sheets into one sheet"
- Next in thread: Steve Gerrard: "Re: VB strings, MSXML, Latin 9, and the Euro"
- Reply: Steve Gerrard: "Re: VB strings, MSXML, Latin 9, and the Euro"
- Messages sorted by: [ date ] [ thread ]
Date: 15 Jun 2004 17:33:51 -0700
Hi,
I have an Excel application which is receiving XML via MSXML4, encoded
with charset=ISO-8859-15. The XML text may contain the Euro symbol. I
want to place the text into a VB string, and sometime later, a cell.
If I decode the XML text into a byte array, I can see that the Euro
has been correctly decoded using the Windows charset CP1252 to the
value 128 (0x80).
However if I create an empty string and append the VB Euro symbol -
Dim str as String
Dim b() as Byte
str = Chr(128)
b = str
msgbox "high byte=" & b(0) & ", low byte=" & b(1)
I find that the Euro should be encoded with high and low values of 177
& 32. So when I create a VB string from the XML text, the Euro
character is completely wrong.
I'd really appreciate any insight into what's happening here, and how
to correctly specify the charset when I create the VB string, or
alternatively, the correct character set to use on the XML encoding
side.
Many thanks,
Rod
- Next message: Tom Ogilvy: "Re: Office 2000 Programming with Office 2003"
- Previous message: mudraker: "Re: Copying a column from several similar sheets into one sheet"
- Next in thread: Steve Gerrard: "Re: VB strings, MSXML, Latin 9, and the Euro"
- Reply: Steve Gerrard: "Re: VB strings, MSXML, Latin 9, and the Euro"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|