Okay, I posted a thread last week and the issue wasn't resolved... I think my code was misunderstood. If anyone wants to take a look, here's the thread.
http://www.perlmonks.org/index.pl?node_id=478486
In that thread, I was told "Kakasi doesn't do anything w/ an ASCII based string." Well, obviously. I wasn't passing it one. :/
Code below attmpets OOP style and non-OOP. I assume it's a problem w/ one of the options, but I've tried more than a few different combinations. FYI $str holds an EUC encoded kanji. Coincidentally, so does $jpn and $nstr.
#!/usr/bin/perl
#
#
use strict;
use warnings;
use Text::Kakasi;
open ( OUT, ">poo" ) || die $!;
my $str = "ËâË¡";
my $k = Text::Kakasi->new('-JH','-c','-w','-i euc','-o euc');
$k->set('-w', '-c', '-JH', '-i euc', '-o euc');
my $jpn = $k->get($str);
print OUT "$str = $jpn ". "\n";
print OUT "error = " . $k->error . "\n";
my $res = Text::Kakasi::getopt_argv('-JH', '-c', '-w');
my $nstr = Text::Kakasi::do_kakasi($str);
print OUT "jpn = $nstr\n";
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.