UTF-8 encoding decoding not working with Danish characters

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stanimir Stamenkov

    #16
    Re: UTF-8 encoding decoding not working with Danish characters

    /LarsM/:
    [color=blue][color=green][color=darkred]
    >>> My XML document is generated from the contents of a MySQL database. It is UTF-8 encoded.
    >>>
    >>> However, the Danish special characters appear wrong.
    >>>
    >>> For example the letter å becomes "Ã¥", the letter ø becomes "ø"
    >>>
    >>> See an examle here:
    >>> http://netm.dk/blog/rss/index_rss2.xml[/color]
    >>
    >> Sound like an MySQL configuration issue, to me.[/color]
    >
    > Sorry, but excactly how do I set that setting, which Nick Kew and Henry
    > Sivonen suggested?
    >
    > I have been reading through the RFC, but it is not completely clear to me...[/color]

    Please, quote at least some relevant text from the post you're
    replying to.

    What I've meant is, AFAIK MySQL versions prior 4.1 doesn't handle
    Unicode characters. I have no experience with the 4.1 version but
    seems the encoding configuration could be tricky with it, too.

    It could happen that a text is inserted into the DB using some
    encoding and read using another (depending on the connection driver
    configuration) producing different results. So, I guess, somehow the
    info is inserted UTF-8 encoded but then read using ISO-8859-1, for
    example. Generally it has nothing to do with RFCs but MySQL specific
    configuration.

    I've worked on an application which used MySQL 4.0 as data store and
    because it was targeted for the Japanese market we had to configure
    the connection driver specifically to encode/decode using a
    Shift_JIS encoding.

    --
    Stanimir

    Comment

    • LarsM

      #17
      Re: UTF-8 encoding decoding not working with Danish characters


      "Stanimir Stamenkov" wrote :[color=blue]
      >
      >
      > What I've meant is, AFAIK MySQL versions prior 4.1 doesn't handle Unicode
      > characters. I have no experience with the 4.1 version but seems the
      > encoding configuration could be tricky with it, too.
      >[/color]
      Thank you Stanimir. I think my Web host is on 4.0 only. I will look into
      that and maybe go for another encoding all the way through...
      Sorry about not quoting correctly...

      Regards,
      Lars



      Comment

      • Rob van der Putten

        #18
        Re: UTF-8 encoding decoding not working with Danish characters

        Hi there


        LarsM wrote:
        [color=blue]
        > I am new to XML, but I use it for an RSS feed.
        >
        > I have one problem, which I have really been struggling with.
        >
        > My XML document is generated from the contents of a MySQL database. It is
        > UTF-8 encoded.
        >
        > However, the Danish special characters appear wrong.
        >
        > For example the letter å becomes "Ã¥", the letter ø becomes "ø"[/color]

        In ISO-8859-1 a-ring is 0xE5, in UTF-8 0xC3 0xA5
        0xC3 0xA5 in ISO-8859-1 is A-tilde Yen.
        The same applies to the other example.

        So maybe the data gets stored as UTF-8 but retreived as ISO-8859-1 and
        then converted to UTF-8.


        Vr.Gr,
        Rob
        --
        +----------------------------------------------------------------------+
        | The EU constitution will turn the EU into a SU |
        | Vote against the EU constitution in the referendum |
        +----------------------------------------------------------------------+

        Comment

        • Andreas Prilop

          #19
          Re: UTF-8 encoding decoding not working with Danish characters

          On Thu, 10 Feb 2005, LarsM wrote:
          [color=blue]
          > X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
          >
          > However, the Danish special characters appear wrong.
          > For example the letter ? becomes "??", the letter ? becomes "??"[/color]

          As long as you are unable to post special, non-ASCII characters
          with appropriate MIME header in your newsreader^W Outlook Express,
          don't expect anything.

          You need to make these settings:

          Tools > Options > Send
          Mail Sending Format > Plain Text Settings > Message format MIME
          News Sending Format > Plain Text Settings > Message format MIME
          Encode text using: None

          Better yet, get a newsreader instead of OE.

          --
          Top-posting.
          What's the most irritating thing on Usenet?

          Comment

          Working...