IO::Scalar doesn't do binmode?



I was playing with Lingua::RU::Number, and noticed that it could only
output WINDOWS-1251 character set. Well, no problem, I think, I'll just
wrap it with IO::Scalar and let the encoding abstraction handle the
conversion to UTF8 for me.

So, I did this:

perl -MLingua::RU::Number=rur_in_words -MIO::Scalar \
-le '$win=rur_in_words(123);\
$s=new IO::Scalar \$win; \
$s->binmode(":windows-1251");binmode(STDOUT,":utf8"); \
print $s->getline()'

And got WINDOWS-1251 output again. Did I miss something, or is
IO::Scalar not supporting encoding conversion via binmode?

.



Relevant Pages

  • Re: Wrap rev 2.
    ... > Output file adds .wrap to input filename. ... > Watch those extra-long lines and hard tabs in Usenet posts. ... > decide to keep the conversion here; ... Note that memory management is slated for the next revision. ...
    (comp.lang.c)
  • Re: Most Komplex Kanji ?
    ... >> conversion to read UTF8, and usually I can't be bothered. ... I'm still using tin in a kterm, linked to a JISified version of vi ...
    (sci.lang.japan)
  • Question on conversion from UTF8 to Shift_JIS (or ISO-2022-JP)
    ... I've some questions about converting Japanese from UTF8 to Shift_JIS ... The first conversion from UTF8 to Shift_JIS is done using Text::Iconv. ...
    (comp.lang.perl.misc)
  • Re: confusion and case problems: utf8 <-> iocharset
    ... the terminology in vfat.txt is not consistent with what actually ... It says "iocharset" but in fact it is not a charset used for IO ... you want to use "utf8" systemwidely. ... iocharset=utf8 doesn't have a case conversion table. ...
    (Linux-Kernel)
  • Re: Racy NLS behaviour in FAT (and possible other fs)
    ... conversion. ... If I mount a vfat fs with utf8 and then create a file ... with invalid utf-8 sequences, the file will briefly exist with these ...
    (Linux-Kernel)