Front page | perl.perl5.porters |
Postings from July 2000
utf8 characters
From:
j k
Date:
July 31, 2000 11:12
Subject:
utf8 characters
Message ID:
20000728153151.22669.qmail@web5305.mail.yahoo.com
Hello -
We are using the utf8 pragma to convert latin
characters from an input file to utf8 characters to
insert into the database. This is how we are using
it:
use utf8;
my $name =~ tr/\0-\xff//UC;
I'm getting 2 errors:
1) Malformed utf8 character at line 72...
(this is the line that has the tr///UC; statement)
2) When we do an update statement to the database
with the converted $name variable, there is an SQL
error. We are using a utf8 compliant informix DB.
The update statement looks like:
update table_name set name=$name where id=$id
The error (-202) says that there is an invalid
character.
Are we using the correct format for using utf8? Is
the tr///UC statement correct? Can anyone offer any
assistance?
Thanks so much!
Jennifer
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/