[I18n-sig] Re: Mixed encodings and XML

Tamito KAJIYAMA kajiyama@grad.sccs.chukyo-u.ac.jp
Thu, 14 Dec 2000 13:31:20 +0900


uche.ogbuji@fourthought.com wrote:
| 
| The intention, I'm pretty sure, is to provide examples than
| can be cut and pasted in order for people to play with the
| various snippets themselves.

I don't think that mixing different encodings in a document is a
good idea.  A brower assumes an encoding when reading a sequence
of characters from a stream.  If the browser finds one or more
bytes out of the expected range, the result of decoding is
undefined in general.  So, cut-and-paste may or may not pass
correct character data to the user.

Safer ways for giving examples in various encodings are:
- to use Unicode for displaying code snippets in the document
  the end users see on their browsers, and
- to use native encodings in separate files to provide the real
  code snippets.

Authoring an XML source of the document is another story.

Regards,

-- 
KAJIYAMA, Tamito <kajiyama@grad.sccs.chukyo-u.ac.jp>