• 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: Question about line breaks and file types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about line breaks and file types


  • Subject: Re: Question about line breaks and file types
  • From: mmalcolm crawford <email@hidden>
  • Date: Mon, 4 Aug 2003 22:51:50 -0700

On Monday, August 4, 2003, at 4:49 PM, Dustin Voss wrote:

Unfortunately, as I stated in another message, Cocoa might not consider U+2028 or U+2029 to be line breaks. They aren't in [NSCharacterSet whitespaceAndNewlineCharacterSet], anyway.

There's reason to believe that's a documentation bug -- it states:

whitespaceAndNewlineCharacterSet
+ (NSCharacterSet *)whitespaceAndNewlineCharacterSet
Returns a character set containing only the whitespace characters space (U+0020) and tab (U+0009) and the newline character (U+000A).

however:
NSCharacterSet *whiteNewlineSet =
[NSCharacterSet whitespaceAndNewlineCharacterSet];

NSLog(@"U+2028 %@", ([whiteNewlineSet characterIsMember:0x2028]
? @"YES" : @"NO"));
NSLog(@"U+2029 %@", ([whiteNewlineSet characterIsMember:0x2029]
? @"YES" : @"NO"));

2003-08-04 21:12:38.403 NewLine[467] U+2028 YES
2003-08-04 21:12:38.404 NewLine[467] U+2029 YES

Thanks to Aki Inoue for the code sample.

mmalc
_______________________________________________
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: Question about line breaks and file types (From: Dustin Voss <email@hidden>)

  • Prev by Date: Java in Panther
  • Next by Date: compiler warning
  • Previous by thread: Re: UNICODE problem - conversion creates ill characters _between_ written strings
  • Next by thread: NSTextView, resignFirstResponder and textShouldChange
  • Index(es):
    • Date
    • Thread