• 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
Re: Launch Email or Browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launch Email or Browser


  • Subject: Re: Launch Email or Browser
  • From: Rosyna <email@hidden>
  • Date: Fri, 17 May 2002 20:11:27 -0700

Instead of doing it manually, try

myMsg=(NSString*)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef) [myProduct theMsg], NULL, NULL, kCFStringEncodingUTF8);

then later...

[myMsg release];

Definition of above function is:

CFStringRef CFURLCreateStringByAddingPercentEscapes(CFAllocatorRef allocator, CFStringRef originalString, CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding);

The 1023 limit may be based on max path. I am was not aware NSCFStrings had terminators.

Ack, at 5/17/02, John Nairn said:

myMsg=[[NSMutableString alloc] initWithString:[myProduct theMsg]];
[self replaceString:@":" withString:@":" inString:myMsg];
[self replaceString:@"/" withString:@"/" inString:myMsg];
[self replaceString:@"@" withString:@"@" inString:myMsg];
[self replaceString:@"#" withString:@"#" inString:myMsg];
[self replaceString:@";" withString:@";" inString:myMsg];
[self replaceString:@"%" withString:@"%" inString:myMsg];
[self replaceString:@" " withString:@" " inString:myMsg];
[self replaceString:@"\n" withString:@" " inString:myMsg];

--


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
---

Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks.
_______________________________________________
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.
References: 
 >Re: Launch Email or Browser (From: John Nairn <email@hidden>)

  • Prev by Date: Re: QuickTime, Cocoa & Documentation
  • Next by Date: Re: 2 Cocoa Method Questions
  • Previous by thread: Re: Launch Email or Browser
  • Next by thread: Re: Launch Email or Browser
  • Index(es):
    • Date
    • Thread