This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: FW: ] Top Ten Java and XSLT Tips, #5


> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of timw@3d3.com
> Sent: Wednesday, September 05, 2001 9:31 AM
> To: XSL-List@lists.mulberrytech.com
> Subject: [xsl] FW: ] Top Ten Java and XSLT Tips, #5
>
>
>
> Hi Dimitre,
>
> I think Eric is thinking of it in terms of XHTML - so wants it as
>   for
> browser display.
>
> Personally, I never use anything other than   because I have
> never had
> any problems with it being rendered in a browser other than intended. (I
> generally use output method "html" for browser display)
>
> Apparently when the output method is "xml", (for XHTML display) Microsoft
> Internet Explorer 5.5 running on Windows 2000 capital letter "A" with the
> circumflex accent symbol above it.
>
> That is the example he has given me of a place where  
> doesn't display
> as expected in the browser.

What happened was:

a) A file was saved as XHTML with encoding UTF-8.

b) The file extension is "html".

c) The file is loaded locally from the filesystem and runs through IE's HTML
parser (not MSXML).

d) The HTML parser ignores the XML encoding declaration - it look for an
optional META tag specifying the encoding and doesn't find it.

e) With no information about the encoding, it falls back to whatever it
thinks is best, on my machine to ISO-Latin-1.

Fix: produce correct META tags. Inserting a

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

will fix Eric's problem.

So, as far as I understand the situation, this is almost expected behaviour:
IE doesn't really support XHTML yet, so it will ignore XML encoding
declarations when displaying XHMTL through it's HMTL engine.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]