xsl-list
[Top] [All Lists]

RE: character entities

2005-05-02 09:42:56
Edward,

At 10:49 AM 5/2/2005, you wrote:
If that were true, it would be fine with me. I am not trying to output character references just for the sake of doing it. I was under the impression that I should try to do it because some browsers would have a problem with UFT-8 encoded data. Specifically, articles such as this one at A List Apart:

http://www.alistapart.com/articles/emen/

claim that "many more browsers choke on UTF-8 characters than do on named entities." Yet you claim that there is no distinction?

Is this true or isn't it?

Articles like that are quick to go stale. Browsers change all the time, and UTF-8 is safer now than it once was. This is a moving target. Sometimes there's a reason to target older browsers -- and contrary-wise, sometimes there's a reason to encourage your audience to use browsers that actually conform to relevant standards.

In any case (as I'm sure we've explained) when you're outputting HTML, many/most serializers will write named entities where HTML has them, if necessary (writing UTF-8 it shouldn't be for the reason Mike gave). So trying an encoding like iso-8859-1 might be an idea, if it helps you sleep better.

You can force numeric character references in your output for all "upper-ASCII" and everything else besides the first 128 characters by asking for encoding="US-ASCII" or some equivalent, if your processor supports it (Saxon does). This is sometimes useful.

Good luck,
Wendell


======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>