Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] RFC



As I was just trying to sleep, an interesting Idea came to me :-)
I'd love to switch to using utf8 locales if that would work without
obstacles. One of those is the filename problem:
I have lots of files named in japanese, which I would have to convert
from euc-jp encoding to utf8 encoding if I were to permanently switch my
default locale encoding. (Not that it would be a big problem, but...)
Just for trying out or if one wants to use both encodings (AFAIK X11
doesn't really support utf8 locales yet ?) that would be a bit much
tho. So it would be really neat if one could configure the glibc to
translate between an utf8 filesystem encoding and the locale encoding
one is currently using. This gets us another Problem, characters that
exist in utf8 but not in the locale one is using. To solve this my
favoured solution would be to escape those characters in this way:
If a filename contains a not encodable character or "!" or "\", prepend
it with "!" [1].
Escape any "!" with "\!"
Escape any "\" with "\\"
Escape all not encodabled utf8 sequences by escaping each byte in octal
representation (\xxx\xxx\xxx)

Would that be difficult to implement ?
Of course there would be a performance hit, but it should just be a
compile time option for the transition time...

And it would be neat to do be able to use ls in both kterm and unicode
xterm and have the characters show up right...

Comments ?

[1] "!" more or less randomly chosen, at least I think I don't have seen
    much files beginning with "!"

-- 
Tobias								PGP: 0x9AC7E0BC


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links