It seems that NSTask
calls -[NSString fileSystemRepresentation]
to encode values for each of the arguments you give it.
This can become a problem in some situations due to the fact that -fileSystemRepresentation
encodes using decomposed unicode forms: for example, the a-umlaut (ä) would be encoded as U+0061 (Latin small letter a) and U+0308 (Combining diaeresis), as opposed to U+00E4 (Latin small letter a with diaeresis). The -UTF8String
method, on the other hand, seems to do the opposite.
I need my NSTask
arguments to be encoded using composed forms. How do I work around this issue?