Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^5: open sqilite path unicode

by andal (Hermit)
on Nov 04, 2013 at 08:21 UTC ( #1061103=note: print w/replies, xml ) Need Help??

in reply to Re^4: open sqilite path unicode
in thread open sqilite path unicode

Don't forget, there are different ways to support Unicode in the file system. I've worked a lot with Unicode texts in Perl and it is fairly good, nothing to complain about. But when it comes to file names, the system surrounding the application makes it complex. There are different ways to store Unicode names in the file system. Common in Linux (Unix?) is UTF-8 encoding. But there are also UTF-16 (BE or LE), there are UCS-2 and UCS-4 and there might be some other custom way.

So, to solve the problem, it is better to learn, how Unicode characters are stored in your file system. Here, the readdir definitely can help. Just read the content of directory, dump file/directory names as hex and see which encoding is used. Of course, if you intend your application to run on different systems, then you are doomed to learn all possible ways Unicode is supported on them and finding out, how your program can automatically figure out the correct one.

Replies are listed 'Best First'.
Re^6: open sqilite path unicode
by choroba (Chancellor) on Nov 04, 2013 at 09:03 UTC
    you are doomed
    Or, in other words, there is no standard way for a file system to signal its encoding to programs.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061103]
vrk takes a cookie from the platter on the sideboard.
Eily thinks vrk is a cookie monster
talexb thinks the term 'cookie monster' is unnecessarily drogatory ;) and takes a cookie as well. Mmmm. Delicious cookies.
[davido]: A tool as pretentious as Test::Perl::Critic ought not fail to install because one of its dependencies failed to pull in List::MoreUtils.
[davido]: ...and

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (13)
As of 2017-04-25 15:58 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (458 votes). Check out past polls.