[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Multibyte output


xml fe ff
Thanks Mike and Michael!

I am using MSXML and XML spy.  I tried setting the encoding type in two
different ways.

<?xml version="1.0" encoding="GB2312"?>

and

<xsl:output media-type="text" encoding="GB2312" indent="no"/>

Neither of these worked.  Is there anything else I should try?  How can I
get XML Spy to use "byte" output methods instead of "string"? 

Could I perhaps create another xsl that would convert UTF-16 to UTF-8?

Perhaps I could/should use a different XSLT?

Thank you all again!

--Dan

-----Original Message-----
From: Mike Brown [mailto:mike@s...]
Sent: Tuesday, May 07, 2002 6:44 PM
To: Cutler, Dan
Cc: xml-dev@l...
Subject: Re:  Multibyte output


Cutler, Dan wrote:
> I am getting really strange output from this XSL transform.
> 
> The output  *looks* perfect - however, each character looks as though it
was
> prodced in UTF-16 (each char is represented in two byes with a leading 00
> byte).  Also, the files begins with a char 127 and char 126???

That's also part of UTF-16. It's the BOM (Byte Order Mark), an indicator of
whether the remaining byte pairs are low-byte first (little-endian) or
high-byte first (big-endian). That is, if it were FE FF instead of FF FE,
the
00's would be trailing, not leading.

> I explicitly set the encoding to UTF-8 but it still doesn't work.

If you're getting UTF-16 even when you specified UTF-8, I suspect you're
using MSXML (well, the other clue was your xml-stylesheet p.i.) and caching 
your output in strings, which on Win32 are always UTF-16 encoded. I'm no 
expert on this subject, but it comes up a lot. See if the message at

 http://www.biglist.com/lists/xsl-list/archives/200108/msg00541.html

helps.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.