Re: Question about line breaks and file types
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.