perl-unicode

Re: perlunicode comment - when Unicode does not happen

2004-01-05 13:30:05

"Jungshik Shin" <jshin(_at_)mailaps(_dot_)org> wrote in message
news:Pine(_dot_)LNX(_dot_)4(_dot_)58(_dot_)0312290411290(_dot_)1995(_at_)jshin(_dot_)net(_dot_)(_dot_)(_dot_)
I think you are on "our" side.


This has been a wonderful thread - a great discussion - and I learned a lot
from it. Thanks everyone. Even with odd comments like the above
interspersed.

In regard to the file contents, I'd like to say that since Perl already has
wonderful support for dealing with the encoding of file contents I don't see
a great need to rush towards a locale-setting-influenced default for file
contents or some other solution based on magically detecting the encoding of
mounted file systems or directory paths (whatever that means - I'm not
convinced it means anything). I think some work needs to be done so everyone
fully understand what needs to be done here, but I don't see any reason to
hurry.

But in regard to file names, I think something needs to be done now. Today
the right thing is not being done and there are no facilities for a
workaround. For "-d" (and other file system functions) to blindly send
utf8-flagged strings to the platform does not seem useful to me. It might
work sometimes by accident, but that doesn't make it logical or good. It
seems that some people are convinced that a transparent fix cannot be made
(or is prohibitively complicated) and that we need something new (pragmas or
environment variables) to fix this. I don't agree - mostly because I don't
see the need for a perfect hands-off solution on all platforms and in every
environment - but I won't object to being able to write Perl scripts that
work correctly regardless of how horrible the hack is. (I think the hacks
are fine, but I think the "other" guys should be forced to use the hacks,
not me since I use a "good" platform - ha ha.) The key thing is to allow for
the transcoding of paths to and from utf8-flagged strings and some other
encoding just before and after the file-system related system call (after -
or before - path parsing might be done). My Shift-JIS woes will then
disappear (at least in regard to the core). A hacky fix should be almost
trivial to implement - and there's something to be said for quickness in
this case.

Regards,

=ED


<Prev in Thread] Current Thread [Next in Thread>
  • Re: perlunicode comment - when Unicode does not happen, Ed Batutis <=