I still have a few Delphi posts in the queue that I've been going through and cleaning up. Now that Delphi Mac support has shipped, there were a couple RTL functions that I wrote that may be useful to some people out there interacting with POSIX.
StringToFileSystemString (Mac only)
FileSystemStringToString (Mac only)
Mac stores file names internally as decomposed UTF-8 strings. This means that the diacritic will be a separate character after the character the diacritic is applied to. This is different than other POSIX platforms or Windows. Because of this all strings that are returned from file system functions need to be translated to a Delphi UnicodeString for use with the rest of the application. StringToFileSystemString and FileSystemStringToString will convert between a UnicodeString and a UTF-8 decomposed string.
No comments:
Post a Comment