in reply to Encoding of DBI PostgreSQL output

It's not really clear to me whether your problem is with Postgres or Perl. Supposing that the data returned from Postgres is proper UTF8-strings, you should be able to use Unicode::String thus:
$ perl -MUnicode::String=utf8 -le 'print utf8("blÃ¥bærsyltetøy")->la +tin1()' blåbærsyltetøy $

Replies are listed 'Best First'.
Re: Re: Encoding of DBI PostgreSQL output
by Kjetil (Sexton) on May 21, 2003 at 13:03 UTC
    Hehe!

    How would I do this if I were to translate a whole file?

    I tried:

    use Unicode::String qw(utf8 utf16 latin1); Unicode::String->stringify_as("utf8"); while (<>) { print utf8($_)->latin1(); }

    But that did nothing...

    Anyway, that you have ø for ø seems to imply that I do have the correct characters, since that is what I see for ø too...

      Uhm, an RTFM response would be appropriate to that question... :-) OK, umap should do that...

      But umap has no effect on my files....

      Weird....?