encoding problem

Discussion in 'XML' started by Tjerk Wolterink, Jul 14, 2005.

  1. i output my xsl files in ISO-8859-1
    and the xml files are also in ISO-8859-1

    in an xml file i have the entity: ö

    But after a number of xsl transformations
    i get the following in the output document: ö

    It should be an o umluat,

    it has something to do with encoding, but i have
    set the encoding everywhere
    wat can be the problem?
     
    Tjerk Wolterink, Jul 14, 2005
    #1
    1. Advertising

  2. Tjerk Wolterink wrote:

    > i output my xsl files in ISO-8859-1
    > and the xml files are also in ISO-8859-1
    >
    > in an xml file i have the entity: ö


    That is not an entity, it is a character reference.

    > But after a number of xsl transformations
    > i get the following in the output document: ö


    That is what you get when the two bytes used to encode an 'ö' in UTF-8
    are then interpreted as ISO-8859-1.
    So it might be that your XSLT transformation result is serialized as
    UTF-8 but the application you use to view the serialized result thinks
    the stuff is ISO-8859-1 encoded.

    > it has something to do with encoding, but i have
    > set the encoding everywhere
    > wat can be the problem?


    You need to provide more information, which processor do you use, how do
    you run that transformation (e.g. from the command line or using an
    API), what kind of output is created (e.g a file, or perhaps a HTTP
    response body sent to a browser), how do you view the output.
    For instance if the result of the transformation is sent to a browser
    then you can set the charset parameter in the HTTP Content-Type response
    header.
    Of course if the whole procedure is processor dependant it might be
    easier to ask on a mailing list devoted to the particular processor. But
    you can try here but you need to provide more information for anyone
    being able to help.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jul 14, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Slade

    Problem encoding/decoding image

    Slade, Jun 25, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,118
    Natty Gur
    Jun 25, 2003
  2. Hardy Wang

    Encoding.Default and Encoding.UTF8

    Hardy Wang, Jun 8, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    18,869
    Jon Skeet [C# MVP]
    Jun 9, 2004
  3. Replies:
    1
    Views:
    23,371
    Real Gagnon
    Oct 8, 2004
  4. Greg
    Replies:
    9
    Views:
    820
    Nobody
    Oct 8, 2011
  5. Replies:
    2
    Views:
    373
Loading...

Share This Page