Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Converting East Asian strings

by Burak (Chaplain)
on Apr 14, 2009 at 18:02 UTC ( [id://757448]=note: print w/replies, xml ) Need Help??


in reply to Converting East Asian strings

I wonder why don't we have something like this in core or at least in IO::File? Anyone suggested and rejected by porters?

Replies are listed 'Best First'.
Re^2: Converting East Asian strings
by Corion (Patriarch) on Apr 14, 2009 at 18:36 UTC

    As far as I'm aware, there are some plans for redoing the filename handling of Perl, but the ugly problem is that Windows is the only OS that has something remotely resembling a statement about the encoding of filenames. Unixish operating systems use "native" filename encoding, that is, simple octet streams, but there is no easy way for Perl to find out what encoding a filename uses. I don't know if at least OSX states the encoding of a filename, or even simply uses UTF8. And let's not start talking about network shares...

      ...but there is no easy way for Perl to find out what encoding a filename uses.

      Not sure why Perl would have to find out the encoding of filenames. Last time I needed such a thing, I would have been perfectly happy to have a pragma - something like use filenames "UTF-8", or so - in order to manually specify the encoding being used with filenames on the system in question.

      I mean, no need to auto-determine anything here. Perl doesn't try to determine the encoding of file's contents either, or the encoding of the script source... For this, we have IO layers and use utf8; (for the source) or use encoding "...";. In other words, here it's also in the responsibility of the programmer to specifiy all encodings being used.  Why should filenames be handled differently?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://757448]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-18 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found