On Sat, Mar 21, 2009 at 2:31 PM, Ben Lachman <blach...@mac.com> wrote: > My software uses UTF8 almost exclusively. However, for some odd reason, > arguments passed from a perl cgi script to one of my command line helper > apps are encoded as MacRoman.
Where is the CGI script getting the text, and what encoding does it start off in? > That's not a problem since I can just use > [NSString stringWithCString:argv[i] encoding:NSMacOSRomanStringEncoding]. > However it seems that one can't convert MacRoman -> UTF8 after you get it > into a NSString. I don't know what you mean by "convert MacRoman -> UTF8 after you get it into a NSString". After you get text into an NSString it is, by definition, no longer MacRoman. > Is there a way to make this conversion in code so that > once I read the arguments I can just deal with them like all the rest of the > strings in my app? > > Another viable solution would be a way to make the arguments passed in UTF8 > since they are when they're handled by the script anyway--they must be > getting changed somewhere in the bowels of the exec/system commands. -- Clark S. Cox III clarkc...@gmail.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com