Discussion:
Trying to display other character sets through XML
(too old to reply)
Zws23
2006-05-23 14:50:02 UTC
Permalink
Hello all-
I'm having a ton of trouble trying to display a couple of different
languages using XML. I'm using XML in .asp pages to display the same
information in different languages. I've been able to translate and display
properly in most languages I've done (Spanish, Norwegian, Swedish, etc.),
however, I am having a lot of trouble when I am trying to display in Greek or
a different character set. If I set the encoding in the XML tag to UTF-8, the
page loads fine, but most of the characters appear as question marks. If I
try and set the encoding to ISO-8859-1, I get an error displayed as:
Error Code: -1072896657
Error Reason: Switch from current encoding to specified encoding not
supported.
I've tried a million different things to switch this around, but haven't
found anything that works. I have the character set loaded on my machine,
I've switched the language on my browser, etc.. The Greek characters xml file
looks correct when it is opened in wordpad.
Does anyone have any ideas or suggestions on how I can make this work?
Thanks,
Zach
Julian F. Reschke
2006-06-01 08:54:02 UTC
Permalink
Post by Zws23
Hello all-
I'm having a ton of trouble trying to display a couple of different
languages using XML. I'm using XML in .asp pages to display the same
information in different languages. I've been able to translate and display
properly in most languages I've done (Spanish, Norwegian, Swedish, etc.),
however, I am having a lot of trouble when I am trying to display in Greek or
a different character set. If I set the encoding in the XML tag to UTF-8, the
page loads fine, but most of the characters appear as question marks. If I
Error Code: -1072896657
Error Reason: Switch from current encoding to specified encoding not
supported.
I've tried a million different things to switch this around, but haven't
found anything that works. I have the character set loaded on my machine,
I've switched the language on my browser, etc.. The Greek characters xml file
looks correct when it is opened in wordpad.
Does anyone have any ideas or suggestions on how I can make this work?
Thanks,
Zach
Generally, for a browser to do the right thing, the following items need
to be consistent:

- Encoding in Content-Type response header
- Encoding in XML declaration, when present
- Encoding in HTML META tag, when present

If you show us the code of your ASP page, it'll probably simple to find
the problem. For instance, transforming to a string then writing the
string to the response object usually will cause this problem.

Best regards, Julian

Loading...