[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Encoding attribute
I don't understand anything, I tried with this entity <!DOCTYPE xsl:stylesheet [<!ENTITY euro "€">]> and with € 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 € or € 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|