Altova Mailing List Archives

Re: [xsl] encoding of text files

From: Mike Brown <mike@-------->
Date: 11/14/2002 1:02:00 AM
Joerg Heinicke wrote:
> I have a problem with generated java/text files and their encoding.

Then this problem is not appropriate for xsl-list.

> It should be possible to have text files in UTF-8, shouldn't it??

Of course. Any file is just bytes. Those bytes can represent text
according to a particular encoding, or anything else.

> What can then be the problem?
> How are text files marked as UTF-8?

Ordinary text files have no way of indicating their encoding. XML document
entities and parsed general entities have encoding declarations for this
purpose, and XML parsers also accept external declarations of encoding, such
as what might be obtained from a transport protocol (HTTP response
Content-Type header, for example) by whatever is feeding the entity's bytes to
the parser.

The sender and receiver of the bytes that constitute a file intended for
processing as textual data must be in agreement on what encoding was used to
produce those bytes. How you do that in your non-XSLT related application is a
matter you should take up in a more apporpriate forum.

   - Mike
  mike j. brown                   |  xml/xslt:
  denver/boulder, colorado, usa   |  resume:

 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.