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

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

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

Replies are listed 'Best First'.
Re^3: Problem in inserting Spanish characters(accent) into Oracle
by graff (Chancellor) on Feb 01, 2006 at 05:48 UTC
    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 );