perl-unicode

Re: iso-2022-jp, adding encodings..

2001-06-15 18:28:57
On 15 Jun 2001, Andreas Marcel Riechert wrote:

Benjamin Franz <snowhare(_at_)nihongo(_dot_)org> writes:

my $sjis_string = from_utf8({ -string => $utf8_string, 
                             -charset => 'iso-2022-jp' })

I hope I will never have to maintain such a code. I could spend hours
to find out wether the author intended to use  "sjis" (Shift-JIS) or 
"iso-2022-jp" (JIS) encoding. 

Sorry. I know the difference and actually considered mentioning it in my
email. The '$sjis' was a typo because the original author _said_ SJIS
although he meant ISO-2022-JP and I originally wrote in my response:

  my $sjis_string = from_utf8({ -string => $utf8_string,
                               -charset => 'sjis' });

before I realized his misuse of 'sjis' to mean 'iso-2022-jp' and changed 
the example (unfortunately, incompletely).

-- 
Benjamin Franz

"Premature optimization is the root of all evil in programming."
                                         ---C.A.R. Hoare


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