JFS default behavior (was: UTF-8 in file systems? xfs/extfs/etc.)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Chris Siebenmann
You write:
| Please put valid encoding info somewhere [...]There is no place for encoding information in the Unix API;
Big surprise;)
Quoted 6 lines
you would
have to implement a new one. Even if the kernel is informed of process locale when a process creates files, a new API that returns filename encoding alongside the file name itself is necessary. And relying on process locale on creation leads to undesirable results in some cases.
Quoted 8 lines
| [...] or declare filenames are utf-8 od utf-16 only - changing user | locale should not corrupt old data.
Since not all byte sequences are valid UTF-8, this immediately means
that some old files are inaccessible since their filenames are now illegal[*]. This also screws everyone who has no desire to work in UTF-8, and it screws everyone completely if ever UTF-8 is decided to not be the solution to the world's problems.
So what ?
Do you think an app that expects utf-8 filenames won't crash today when served a byte sequence that's invalid UTF-8 ? (or an app that expects ascii when served utf-8 oddities)
The problem exists now - putting encoding info somewhere of agreeing on a common convention won't solve the legacy mess. What it will do is avoid we get stuck the same way in a decade.
As long as an FS is shared by multiple apps/users agreeing on what the filenames mean exactly should not be revolutionary. And btw I don't care if it's UTF-8, UCS or something else. I just want a common ground so peple and apps can communicate sanely.
Cheers,
Signature · 1 line
Nicolas Mailhot