Steve_BZ has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I seem to have a strange problem with my Portuguese characters on a UK-build Kubuntu 9.10 machine with a Firebird database. This is how it goes:
(and if you don't have the relevent font on your machine that first word ends '...c-cedilla, a-tilda, o' and displays nicely everywhere on this machine). The string is 25 characters long. However, if I pick the word up from a database I get problems:my $a = "Identificação do paciente";print $a,"\n";
, then I get Identificação do paciente the first word of which ends with 5 characters instead of three. Each accented charater is replaced by 2 characters '... A-tilda, paragraph-character, A-tilda, pound-sign, o'. The string is 27 characters long and when I make it a hash key the hash doen't work. The values come out as '...Next Page...' (which I think comes from my Komodo IDE trying to deal with whatever is in the key) whatever their real contents.my $a = __t("Patient Id");print $a,"\n";
__t is a translate function which looks up the code on a Firebird database. The database is designed in UTF8 everywhere. When I look at it through Flamerobin or any other database utility it looks fine. I have used use utf8; at the beginning of every module and I'm using DBI with an Interbase driver.
my $loc_dsn = <<DSN; dbi:InterBase:dbname=/home/DB/TEST.FDB; ib_dialect=3; DSN $gl_dbh=DBI->connect($loc_dsn,"******","**********", { PrintError => 1, RaiseError => 1 } ) or die "Can't connect to database" . DBI->errstr;
If you have any ideas or suggestions for debugging, then I'd be very grateful.
Regards
Steve.
|
|---|