salass00 wrote:IIRC even though in programs the filenames may be displayed as if they were using the locale defined codeset the filesystems still always handle the filenames internally as if they are ISO-8859-1/ISO-8859-15 encoded when doing operations with them like case insensitive string comparison.
No AmigaOS file system uses ISO-8859-15 (š 0xA8 = Š 0xA6, ž 0xB8 = Ž 0xB4, ÿ 0xFF = Ÿ 0xBE, œ 0xBD = Œ 0xBC).
FFS (DOS\2-DOS\7 DOSTypes only) and SFS (if formatted without using the case sensitive option) use ISO-8859-
1 for case insensitive compares, it's required for backward compatibility to their AmigaOS 3.x versions (before AmigaOS 4.x everything was ISO-8859-1, there was no charset support in AmigaOS yet).
JXFS uses ASCII ([a-z]=[A-Z]) if formatted without the case sensitive option, therefore regardless of this option UTF-8 file names are always case sensitive on it. IIRC it's the same for FFS with DOSTypes DOS\0 and DOS\1.
Using ISO-8859-15 in an AmigaOS 4.x file system makes no sense at all, it's either ASCII only (identical in all charsets supported by AmigaOS 4.x), ISO-8859-1 for backward compatibility if it's an old AmigaOS-only file system which is available in an AmigaOS 3.x/m68k version as well, or UTF-8 (simply because everything else can't work to get unique names independent of the currently selected charset in locale prefs, even if there are currently a lot of problems with it and probably no single software which can display UTF-8 file names correctly yet).
For your file systems, which have to support Unicode because other systems using them do, you have two options:
- UTF-8
- en-/decoding names with non-ASCII chars using something like Punycode, mime quoted printable, OSTA UDF file name translation (with IsIllegal(x) (x < 32 || x >= 127 || x == ':' || x == '/') ? 1 : 0), etc.