This is getting closer!

Indeed, I'm getting question marks now, so it seems that the characters are indeed somewhat out of range.

But it also makes it harder to understand... Because the characters should be the standard Norwegian characters, all of which are in Latin1... If there are some characters that aren't I could tolerate a ? now and then, if they weren't Norwegian...

What could they be, then....?

Messages come in via e-mail, then encoded as iso8859-1, quoted-printable.

In my initial perl-script, they are decoded using MIME::QuotedPrint. The strings are then inserted into the DB by DBI.

If I use the psql client, the letters come out right, but if I print them they come out as e.g. Ã|.

The two characters Ã| imply UTF8, doesn't it?

I tried to encode with UTF16, but it resulted in errors like:

UTF-16BE:Partial character at /usr/lib/perl5/5.8.0/i386-linux-thread-m +ulti/Encode.pm line 156.

But I guess that's sign it is not UTF16... This happened for LE too.

So, I guess what this means, is that it is UTF8, but for some reason, the normal Norwegian characters is now outside the range of Latin1. I've seen ø QP-encoded as =F8, and that corresponds to its hex in Latin1. But, apparently something happens in the database at some point.

I couldn't find a hex tool here now, but I'll look for it.

Thanks a lot for the help, and more suggestions are always very welcome!


In reply to Re: Re: Encoding of DBI PostgreSQL output by Kjetil
in thread Encoding of DBI PostgreSQL output by Kjetil

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.