• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MacRoman -> UTF8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MacRoman -> UTF8


  • Subject: MacRoman -> UTF8
  • From: Ben Lachman <email@hidden>
  • Date: Sat, 21 Mar 2009 17:31:06 -0400

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. 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. 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.

Thanks,
->Ben
--
Ben Lachman
Acacia Tree Software

http://acaciatreesoftware.com

email: email@hidden
twitter: @benlachman
mobile: 740.590.0009



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: MacRoman -> UTF8
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: Threaded Server using Distributed Objects
  • Next by Date: Re: MacRoman -> UTF8
  • Previous by thread: Re: NSAppleScript - what is going on here?
  • Next by thread: Re: MacRoman -> UTF8
  • Index(es):
    • Date
    • Thread