in reply to Problem in inserting Spanish characters(accent) into Oracle

Maybe if you show us a relevant snippet of the code you've written for this? Also, what exactly is showing up in the database instead of the accented characters you want?

(Hmm... è in Spanish??? Don't you mean é?)

update: One other point: have you tried printing the data to stdout or a plain-text file? This might help to make sure that you really have the accented characters as utf8 in your script. (In other words, you need to make sure that the characters are encoded correctly as utf8.)

  • Comment on Re: Problem in inserting Spanish characters(accent) into Oracle

Replies are listed 'Best First'.
Re^2: Problem in inserting Spanish characters(accent) into Oracle
by Anonymous Monk on Feb 01, 2006 at 05:30 UTC

    Here is the code snapshot, my $insert_sql = qq! insert into C_LANG_ITEMS (lang_code,key,final_translation) values('ES',:1,:2) !; Here is the data, - Seleccione al menos un término de carga

      You haven't told us yet how the oracle content is different from what you expected to get. What are you using to look at the table contents after the insert is done, and what do you see when you look at that?

      It could be that you really are getting the utf8 character data into oracle correctly, but maybe you aren't seeing it as utf8 data when you pull it back out. The DBD::Oracle driver might not be setting the utf8 flag on scalar string values that come back from the database.

      If that's the case, you may need to do something like:

      use Encode; # ... do whatever it takes to query for inserted text, # and assign the "Spanish" string from the DB to $fldvalue ... # the string value from the DB is not flagged as utf8 in Perl, # so set the utf8 flag: my $fldvalue = decode( 'utf8', $fldvalue );