in reply to Re^3: CGI.pm encoding - wrong encoding for ě
in thread CGI.pm encoding - wrong encoding for ě

ok,

use utf8;

fixes the problem with cgi generated fields... BUT

When I select data that has ANY national characters from the DB and print them THEN the output of these chars is messed up. SO I can either have messed up cgi fields (without using use utf8; OR just regular print from db selected variables (with use utf8;)

Replies are listed 'Best First'.
Re^5: CGI.pm encoding - wrong encoding for ě
by Corion (Patriarch) on Jan 25, 2012 at 14:28 UTC

    You will need to learn what encoding is written to the database, and what encoding is returned from the database. Then you will need to Encode::decode from that encoding.

    You will need to repeat that process for all points in your code where you retrieve data from outside of the Perl interpreter, or where you hand off data to the outside of the Perl interpreter.