in reply to Changing text Encoding EUC Shift-Jis

Here again I am faced with an undoubtedly easy coding problem that I am struggling helplessly with
Undoubtedly easy? Maybe if you've read perluniintro and perlunicode. I suspect you're missing an appropriate binmode call and/or use utf8/bytes.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Changing text Encoding EUC Shift-Jis

Replies are listed 'Best First'.
Re^2: Changing text Encoding EUC Shift-Jis
by Hugeusrealus (Initiate) on Jan 24, 2005 at 11:07 UTC
    In a effort to make the myself feel like less of a "retardo" and more like some one who did there research for 3 days before asking this question. and maybe get back a couple points.
    my $name_coded = &jcode::sjis($name);
    then changed the the value in the mail out portion to $name_coded fixed my problem. Thanx E./ Sorry I am not a great perl programer just the asker of semi -intelligent questions. ps I got this anwser from a japanese text book.
      ... ps I got this anwser from a japanese text book.
      Well, I saw use Jcode; and made the assumption(d'oh) that you've actually used it. If you've got perl 5.7 and up, you should definetly just use Encode (as reccomended in perlunicode) and use
      use Encode qw/ encode decode /; my $name_coded = encode("7bit-jis", decode("euc-jp",$name));
      That is assuming that $name is encoded in euc-jp, and 7bit-jis is what you actually want (as opposed to shiftjis, in which case you just put in shiftjis ).

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.