Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 

Go Back   XSL - XML - RSS Forums > XSLForum: Main > XSL Coding General

Tags:



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2008, 08:25 AM
Siegfried Heintze
 
Posts: n/a

Default How to emit entities instead of UTF-8?



I have an svg file with lots of 16 bit unicode Chinese characters expressed
with XML entities.

I'm trying to write an XSL to extract these and it is working.
Unfortunately, it is generating UTF-8 and that is ugly. Is there a way to
make it (re)generate XML entities which display nicely in brain damaged
editors?

(I'm using emacs for windows and it does not seem to have the fonts to
display chinese in UTF-8. I wonder if I upgraded from XP to Vista if I the
courier font would then have chinese? Arial Unicode MS is a font that I do
have that does have chinese but switching to it does not seem to help. It
seems to display a few characters correctly).

Thanks,
Siegfried


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-17-2008, 11:56 AM
Martin Honnen
 
Posts: n/a

Default Re: How to emit entities instead of UTF-8?

Siegfried Heintze wrote:
> I have an svg file with lots of 16 bit unicode Chinese characters expressed
> with XML entities.
>
> I'm trying to write an XSL to extract these and it is working.
> Unfortunately, it is generating UTF-8 and that is ugly. Is there a way to
> make it (re)generate XML entities which display nicely in brain damaged
> editors?


You could try
<xslutput encoding="US-ASCII"/>
or perhaps
<xslutput encoding="ISO-8859-1"/>
In the case of an XSLT 2.0 processor like Saxon the software is then
required to output any characters outside of that encoding as character
references (as long as that is allowed e.g. in element or attribute
content).

http://www.w3.org/TR/xslt-xquery-ser.../#XML_ENCODING

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Contact Us -|- XSL - XML - RSS Forums -|- Archive -|- Top -|-Rules/Disclaimer-|-Help/Support -|-Advertise
© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
All times are GMT. The time now is 06:13 PM.
Style Developed by Epic Designz