perl-unicode

Re: gsm hentai convert

2006-03-14 16:11:16

bart(_at_)solozone(_dot_)com said:
Just to convert (which iconv does not do) ISO08859 or UTF-8 to gsm
338  what do you suggest since I do not eneed multi byte support I
have downloaded the Encode tar ball from CPAN. Is this a one-liner? 

maybe just:

 perl -e 'binmode STDIN,":utf8"; binmode STDOUT,":encoding(gsm0338)";
    print while (<>)'  < utf8.data > gsm.data


(It would be be a one-liner if my mail editing window were wider. ;)

For 8859 input, the binmode on STDIN would be ":encoding(iso-8859-1)"
(or some other final digit, if your data uses some other 8859 page).

        Dave Graff


<Prev in Thread] Current Thread [Next in Thread>