SM Ryan said:
MacOSX file paths are UTF-8 encoding of Unicode (16 bit I think).
The file name length limit is the number of UTF-8 bytes.
you're right is a extract on TN 2078 "migrating from FSSpecs to FSRefs"
:
struct FSRef {
UInt8 hidden[80]; /* private to File Manager*/
};
however at paragraph "FSRefs and long Unicode file names" they wrote :
OSErr FSRefGetName( const FSRef *fsRef, HFSUniStr255 *name )
{
return( FSGetCatalogInfo(fsRef, kFSCatInfoNone, NULL, name, NULL,
NULL) );
}
An HFSUniStr255 is defined as:
struct HFSUniStr255 {
UInt16 length; /* number of unicode characters */
UniChar unicode[255]; /* unicode characters */
};
How file names are encoded
HFS+ disks store file names as UTF-16 in an Apple-modified form of
-------------------------------^^^^^^^
Normalization Form D (decomposed). This form excludes certain
compatibility decompositions and parts of the symbol blocks, in order to
assure round-trip of file names to Mac OS encodings (applications using
the HFS APIs assume they get the same bytes out that they put in).
did I miss somethong ?