-   Programming (
-   -   printing Spanish accent characters in Perl/tk entry widget (

puedo 02-11-2005 10:52 PM

printing Spanish accent characters in Perl/tk entry widget
I am writing a program that stores data in a MySQL database.
This is running on a fully updated Fedora Core 3 system.

Some of this data contains Spanish names like José Nuñez.
I have a Perl/Tk Entry widget to work with the data.
I can type the accented characters into the Entry widget.
I can put it into the MySQL Database. (verified by logging into mysql and doing a select)
I can read it from the MySQL Database into a PERL variable.
I can print it to the console using print "$variable\n";

Writing the variable to the entry wiget causes a problem:
$variable = "José Nuñez";
print "$variable\n"; # this works

the Entry widget now displays:
José Nuñez

I have tried using
use Encode::Unicode; and a few others like that.

Anyone have any ideas?

puedo 02-19-2005 02:16 PM

Here is the answer:

use utf8;
$variable = "José Nuñez";
print "$variable\n"; # this works

all the characters now display correctly in the entry Widget

All times are GMT -5. The time now is 05:56 AM.