SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
What filename characters does Mac OS X support?
Author Message
Post What filename characters does Mac OS X support? 
Ben Escoto wrote: Alastair Rankine <arsptr < at > optusnet.com.au> ([email]arsptr < at > optusnet.com.au[/email])
wrote the following on Sat, 22 Oct 2005 08:29:26 +1000

Technote 1150 describes the HFS Plus volume format in great detail:
http://developer.apple.com/technotes/tn/tn1150.html

In particular, there's a table with a list of illegal characters
here: http://developer.apple.com/technotes/tn/tn1150table.html

Thanks for the references. Unfortunately they're in unicode and I
don't know enough to translate them to ascii offhand. Kevin Horton's
message suggests that all the standard unix characters should be fine
though.

If anyone wants to be more precise about this, by looking at
Alastair's table and translating it into normal unix calls (which deal
with C char *'s), let me know what you come up with.
The table is a list of characters that are allowed to be represented in different ways.

Just some tests:

The lowest mention character in this table is 0x00C0 which is an À. And if you enter "touch 300" the answer is "touch: À: Invalid argument".
It must be replaced by the other Unicode coding 0x0041 and 0x0300 which is A and `.

next test:
0x00B5 which is µ isn't mentioned. So it isn't replaced.

Since this is all 16bit, a function may have converted it to UTF8 to get 8bit (C char).
Then À is represented by 0x41 0xCC 0x80 and µ becomes 0xC2 0xB5.

The codings of ASCII, Unicode and UTF8 are equal for characters <0x80. This characters aren't converted (accept that Unicode is 16bit).

Carsten

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB