Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^11: Japanese character in Linux

by andal (Hermit)
on Jul 11, 2011 at 23:30 UTC ( #913807=note: print w/replies, xml ) Need Help??

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

Well, I would consider using "Encode::decode_utf8" very wrong here. At least from your previous messages it followed, that the data inserted into database was in UTF-16 encoding, so when you apply "decode_utf8" function to it, you create a mess and nothing else. Of course this function does not hurt any of pure ASCII data.

You should use "Encode::decode("UTF-16", $_)".

Replies are listed 'Best First'.
Re^12: Japanese character in Linux
by Anonymous Monk on Jul 14, 2011 at 12:31 UTC

    We have resolved the issue Following changes were done in perl Loader to handle Japanese. Env variable setting :

    $ENV{'NLS_NCHAR'} = 'AL32UTF8';

    Encoding from Shift JIS to UTF8 after data is fetched from Sybase:

    Encode::from_to($sInstrumentNameJ, "shiftjis", "utf8"); #added for te +sting Encode::from_to($sInstrumentShortJ, "shiftjis", "utf8"); #added for t +esting

    Binding Japanese data parameters to be passed as below

    use DBD::Oracle qw(:ora_types ORA_OCI SQLCS_NCHAR ); $dbGOSTky_sth->bind_param(":sInstrumentNameJ",$sInstrumentNameJ,{ora_c +sform => SQLCS_NCHAR}); $dbGOSTky_sth->bind_param(":sInstrumentShortJ",$sInstrumentShortJ,{ora +_csform => SQLCS_NCHAR});

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://913807]
[Your Mother]: Sounds right.
[Corion]: Your Mother: I think that that is basically the origin story. Flat earth started as trolling, but then the real believers drove out the trolls
LanX is pretty brown in summer
[Your Mother]: Though a bad match for the OP in question here. :P
[Corion]: Your Mother: Yeah
[Your Mother]: Americans are still pumping out video games where you get to slaughter as many Germans as you have the GPU for... It has always struck me as odd that this particular case seems fine to people. :\
[LanX]: yep heard the same origin story
[Your Mother]: I like it. I tottered on going into hucksterism because I feel like the world deserves it.
[LanX]: he ... we have a movement here called Anti-Germans based on this
[Corion]: Your Mother: I think that's because (in the west) the Nazi-Germans are recognized as universally evil. Of course, you could do some number games to calculate other measures of evil than "historic losers of second world war" to come up with other evils:)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (18)
As of 2018-03-19 13:39 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.