• 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
NSStringEncoding troubles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSStringEncoding troubles


  • Subject: NSStringEncoding troubles
  • From: Adrian Rutledge <email@hidden>
  • Date: Sat, 13 Jul 2002 17:21:45 -0500

I'm writing an IRC app at the moment, and while [[NSString alloc] initWithData:bleh encoding:NSSomeStringEncoding] works, it escapes non-printing values such as ASCII 02. IRC uses several of the low non-printing ASCII values for control codes, bold, underlines, CTCP, color, etc. I want to stick with using the Cocoa provided encoding and decoding stuff, that will save me a good deal of work when I, eventually, add support for the Japanese encodings. (Should make it nearly free, right? I'll have to research that some, later.) In any case, is there any hidden argument I can give NSString or the NSData instance to make it preserve non-printing characters exactly as they are.

(Note, I thought about merely searching for the escaped sequences, \002 and such, but that runs afoul of someone innocently or not-so-innocently typing such a sequence and sending it, being able to trick my client and make it react in a way I consider wrong.)

-Adrian
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSStringEncoding troubles
      • From: Ondra Cada <email@hidden>
    • Re: NSStringEncoding troubles
      • From: Aki Inoue <email@hidden>
    • Re: NSStringEncoding troubles
      • From: Dan Crevier <email@hidden>
  • Prev by Date: Re: creating sth like "System Preferences"
  • Next by Date: MacWorld Expo
  • Previous by thread: Re: [OT] Quartz Extreme in developer previews?
  • Next by thread: Re: NSStringEncoding troubles
  • Index(es):
    • Date
    • Thread