Re: [Jfs-discussion] Problems with charset.
Brought to you by:
blaschke-oss,
shaggyk
From: Dave K. <sh...@au...> - 2004-06-29 18:15:21
|
On Mon, 2004-06-28 at 15:13, John Goerzen wrote: > > I wonder, though, if there is at least some way to always generate > valid, unique filenames, no matter what? If the same iocharset is consistently used, there shouldn't be a problem. Also, iocharset=utf8 should allow all files to be accessible, although jfs will not accept names that are not valid utf-8 strings. > I've experienced this before (in 2.6, prior to that patch, when I used > rsync to copy some files with Japanese names from my Zaurus). Files > created, but are undeletable 2 minutes later. There was a bad version of the patch in 2.6 for a little while. This was caused by an unintended sign extension. You shouldn't see that particular problem again (I hope). > Ahh. So on OS/2, JFS would translate a stream of bytes in charset A > (whever that may be) to the charset in use on the filesystem, and back? Yes, 16-bit unicode. (Is that UCS-16? The code in fs/nls/ just refers to it as Unicode.) > So on Linux, how does JFS know what charset it is coming *from*? (Say > you have iocharset=utf8, where does that conversion get used, and how > does it know what to convert to/from?) It uses the conversions in linux/fs/nls/nls_utf8.c (or whatever the iocharset is). On lookup, it will convert from utf8 to Unicode to search for the name. readdir will convert back from Unicode to utf-8. > > Don't get the wrong impression. I'm not an OS/2 advocate. I like linux > > much better. I am only trying to explain why jfs was written this way. > > I wish it wasn't. :^) > > What about JFS on AIX? How does it handle this situation? I really don't know. They were not concerned with compatibility with OS/2, so maybe they dropped the unicode completely. I'll have to ask the AIX guys. I know JFS1 was just a stream of bytes. > (We do have an AIX machine here runninf JFS2, and I've never experienced > this problem there. OTOH, it's possible that I've never used anything > but 7-bit filenames there.) > > -- John -- David Kleikamp IBM Linux Technology Center |