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

Re: Encoding attribute

Subject: Re: Encoding attribute
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 30 Jan 2004 16:21:47 GMT
xslt euro
  I don't understand anything,

  I tried with this entity <!DOCTYPE
  xsl:stylesheet [<!ENTITY euro "&#8364;">]> and with &#x20AC;

Don't complicate issues by introducing doctypes and entity declarations.
If you get it all working and afterwards you want to make "& euro;" a
macro for whatever works, then you can do that but it is irrelevant to
your problem.

the way to get a euro is to go &#8364; or &#x20AC; which are equivalent.

that puts unicode character 8364 into your document.

You then transform your document however you like with xslt to produce a
result document.

You then (perhaps) serialise that result tree to a sequence of bytes to
form an XML file in some encoding, and then you pass this document to
some system such as a browser to display the document.

Starting from the end.

* If you haven't got a font installed which has a euro symbol then that
symbol is not going to display whatever you do. (This may sound like
stating the obvious but its probably one of the more common reasons for
problems in this area)

* If you have not got a font (or font system) set up which knows that it
should map the unicode slot 8364 to a font that has a euro in it then
again you are going to see some kind of missing glyph marker.

Both of those problems are really out of scope for this list, and hard
to debug at a distance anyway.

Your document may be written out in some encoding (eg the encoding
specified in xsl:output, or a default such as utf8) but your browser may
be expecting a different encoding (eg a default such as latin 1)
This problem which can be solved by fixing your browser to recognise the
encoding, or avoided by getting xslt to write in the encoding expected
by your browser was the root cause of the long thread about "nbsp"
earlier in the week.

Note its very hard to tell if this is your problem, partly because if
you just put bytes representing characters into your mail they may 
be changed to other bytes representing (hopefully the same) character in
a different encoding by the time the person reads it.

for example the line of your message

  when I change this manually I see exactly the "?" character.

I see as

when I change this manually I see exactly the "\200" character.
although I can tell that the character shown on my screen as \200 
is a single character. I expect though that you saw something else.
It is though octal 200 which is hex 80 which is a control character and
not a printable character at all, how did that get there?


Are you producing html or something else?
Can you hand write an html file that contains a euro that displays
correctly?

If the answer to both those is yes, than we can probably tell you what
to do in xslt to generate html of the form that works when you write it
by hand.

David


-- 
http://www.dcarlisle.demon.co.uk/matthew


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • RE: Encoding attribute, (continued)
      • Fran - Fri, 30 Jan 2004 10:47:38 -0500 (EST)
        • Fran - Fri, 30 Jan 2004 11:17:33 -0500 (EST)
        • Christian Beutenmueller - Fri, 30 Jan 2004 11:34:49 -0500 (EST)
        • David Carlisle - Fri, 30 Jan 2004 11:58:36 -0500 (EST)
        • David Carlisle - Fri, 30 Jan 2004 11:23:16 -0500 (EST) <=
        • Fran - Fri, 30 Jan 2004 12:31:27 -0500 (EST)
        • Fran - Fri, 30 Jan 2004 13:08:33 -0500 (EST)
        • G. Ken Holman - Fri, 30 Jan 2004 14:01:11 -0500 (EST)
        • Michael Kay - Fri, 30 Jan 2004 16:10:44 -0500 (EST)

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
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.