Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^10: Japanese character in Linux

by Anonymous Monk
on Jul 11, 2011 at 12:58 UTC ( #913693=note: print w/ replies, xml ) Need Help??


in reply to Re^9: Japanese character in Linux
in thread Japanese character in Linux

$sSQL = " select japanese_longname, \n"; $sSQL .= " japanese_shortname \n"; $sSQL .= " from <table name> \n"; $sSQL .= " where instrument_id = '1301' \n"; $sSQL .= " and instrument_type = 'ST' \n"; #print("Sql i d $sSQL\n"); $dbFOX_sth=$dbFOX->prepare($sSQL); $dbFOX_sth->execute(); if ( @row = $dbFOX_sth->fetchrow_array ) { foreach ( @row) { $_ = Encode::decode_utf8( $_ ); } ( $sInstrumentNameJ, $sInstrumentShortJ ) = @row;

Here the values stored in $sInstrumentNameJ,$instrumentShortJ are passed to oracle stored procwhich is inserting into Nvarchar2 datatype columns. When we hardcode values with Ascii data like "ABC" it works fine , but for japanese data it comes as junk


Comment on Re^10: Japanese character in Linux
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://913693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-12-19 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (75 votes), past polls