Re: Where is my bicycle?

2015-04-07 Thread Gerriet M. Denkmann
On 7 Apr 2015, at 00:15, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann gerr...@mdenkmann.de wrote: A suggestion, though: Try building your character set using ‘characterSetWithRange:’ and/or the NSMutableCharacterSet methods

Re: Where is my bicycle?

2015-04-07 Thread Quincey Morris
On Apr 7, 2015, at 02:21 , Gerriet M. Denkmann gerr...@mdenkmann.de wrote: it allowed me to create a replacement for characterSetWithCharactersInString: which actually works The only suggestion I have is to return ‘mus.copy’ instead of ‘mus’. Given that we know NSCharacterSet has some

Re: Where is my bicycle?

2015-04-07 Thread Charles Srstka
On Apr 7, 2015, at 2:24 PM, Jens Alfke j...@mooseyard.com wrote: This is the same process that allows you to put Japanese or Cyrillic characters in a string and render them in Helvetica or Papyrus even though those fonts don’t support those character sets. I really want to see a Cyrillic

Re: Where is my bicycle?

2015-04-07 Thread Jens Alfke
On Apr 7, 2015, at 12:59 PM, Charles Srstka cocoa...@charlessoft.com wrote: I really want to see a Cyrillic version of Papyrus now. ;-) http://ihateyouare.deviantart.com/art/Papyrus-Plain-Cyrillic-165111766 http://ihateyouare.deviantart.com/art/Papyrus-Plain-Cyrillic-165111766 You’re

Re: Where is my bicycle?

2015-04-07 Thread Jens Alfke
On Apr 6, 2015, at 2:09 PM, Jack Brindle jackbrin...@me.com wrote: Have you checked the Font you are using to display the character string to see if it contains the bicycle character? If not, you probably won’t get the character you seek. Fonts have nothing to do with it; they’re an

Re: Where is my bicycle?

2015-04-06 Thread Quincey Morris
On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann gerr...@mdenkmann.de wrote: Where is my bicycle gone? What am I doing wrong? Before this thread heads further into outer space… I suspect it [NSCharacterSet] is just broken. Look here, for example: http://stackoverflow.com/questions

Re: Where is my bicycle?

2015-04-06 Thread Paul Scott
On Apr 6, 2015, at 9:57 AM, Charles Srstka cocoa...@charlessoft.com wrote: The problem, then, is likely the fact that NSCharacterSet considers a “character” simply as a UTF-16 code point, rather than a true Unicode character as Swift does. That should not matter. UTF-16 is a variable

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
On 7 Apr 2015, at 00:15, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann gerr...@mdenkmann.de wrote: Where is my bicycle gone? What am I doing wrong? Before this thread heads further into outer space… I suspect

Re: Where is my bicycle?

2015-04-06 Thread Greg Parker
On Apr 6, 2015, at 10:15 AM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann gerr...@mdenkmann.de wrote: Where is my bicycle gone? What am I doing wrong? The problem is that it’s unclear whether the “characters

Re: Where is my bicycle?

2015-04-06 Thread Quincey Morris
On Apr 6, 2015, at 12:29 , Greg Parker gpar...@apple.com wrote: my understanding is that when Cocoa says character it usually means UTF-16 code unit. @.length == 2, for example. Cocoa's string API designed when Unicode was still a true 16-bit character set. I would have said so, too,

Re: Where is my bicycle?

2015-04-06 Thread Jack Brindle
Morris quinceymor...@rivergatesoftware.com wrote: On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann gerr...@mdenkmann.de wrote: Where is my bicycle gone? What am I doing wrong? Before this thread heads further into outer space… I suspect it [NSCharacterSet] is just broken. Look here

Re: Where is my bicycle?

2015-04-06 Thread Michael Crawford
If you're unable to do what you need with Cocoa, maybe it would work to use ICU. Michael David Crawford, Consulting Software Engineer mdcrawf...@gmail.com http://www.warplife.com/mdc/ Available for Software Development in the Portland, Oregon Metropolitan Area. On Mon, Apr 6, 2015 at 4:57

Re: Where is my bicycle?

2015-04-06 Thread Michael Crawford
. Denkmann gerr...@mdenkmann.de wrote: On 7 Apr 2015, at 00:15, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann gerr...@mdenkmann.de wrote: Where is my bicycle gone? What am I doing wrong? Before this thread heads further into outer

Re: Where is my bicycle?

2015-04-06 Thread Greg Parker
On Apr 6, 2015, at 2:20 PM, pscott psc...@skycoast.us wrote: On 4/6/2015 12:29 PM, Greg Parker wrote: I'm not an expert here, but my understanding is that when Cocoa says character it usually means UTF-16 code unit. @.length == 2, for example. Cocoa's string API designed when Unicode

Re: Where is my bicycle?

2015-04-06 Thread pscott
On 4/6/2015 12:29 PM, Greg Parker wrote: I'm not an expert here, but my understanding is that when Cocoa says character it usually means UTF-16 code unit. @.length == 2, for example. Cocoa's string API designed when Unicode was still a true 16-bit character set. That would be UCS-2

Re: Where is my bicycle?

2015-04-06 Thread Greg Parker
On Apr 6, 2015, at 11:15 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: 2. characterSetWithCharactersInString seems to take only the lower 16 bits of the code points in the string. Bug. Works ok though, if all chars in the string have code points ≥ 0x1 (e.g. 턞) The

Re: Where is my bicycle?

2015-04-06 Thread pscott
On 4/6/2015 4:03 PM, Greg Parker wrote: On Apr 6, 2015, at 2:20 PM, pscott psc...@skycoast.us wrote: On 4/6/2015 12:29 PM, Greg Parker wrote: I'm not an expert here, but my understanding is that when Cocoa says character it usually means UTF-16 code unit. @.length == 2, for example. Cocoa's

Re: Where is my bicycle?

2015-04-06 Thread pscott
On 4/6/2015 4:29 PM, pscott wrote: On 4/6/2015 4:03 PM, Greg Parker wrote: On Apr 6, 2015, at 2:20 PM, pscott psc...@skycoast.us wrote: On 4/6/2015 12:29 PM, Greg Parker wrote: I'm not an expert here, but my understanding is that when Cocoa says character it usually means UTF-16 code unit.

Re: Where is my bicycle?

2015-04-06 Thread Quincey Morris
On Apr 6, 2015, at 16:29 , pscott psc...@skycoast.us wrote: But what you were describing *would* be UCS-2. To claim UTF-16 support, variable length encoding must be handled. It’s pretty much understood — on this list — that NSString is based on UTF-16, so we tend to cut the corner that’s

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
On 7 Apr 2015, at 05:44, Greg Parker gpar...@apple.com wrote: On Apr 6, 2015, at 11:15 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: 2. characterSetWithCharactersInString seems to take only the lower 16 bits of the code points in the string. Bug. Works ok though, if all chars

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
On 7 Apr 2015, at 03:42, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Apr 6, 2015, at 12:29 , Greg Parker gpar...@apple.com wrote: my understanding is that when Cocoa says character it usually means UTF-16 code unit. @.length == 2, for example. Cocoa's string API

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
characterSetWithCharactersInString: string ]; BOOL pq = [ charSet longCharacterIsMember: 0x1F6B2 ]; NSLog(@%s CharacterSet from \%@\ contains %s (0x1F6B2),__FUNCTION__, string, pq ? : no ); This prints: CharacterSet from abc  xyz contains no  (0x1F6B2) Where is my bicycle gone

Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
 (0x1F6B2),__FUNCTION__, string, pq ? : no ); This prints: CharacterSet from abc  xyz contains no  (0x1F6B2) Where is my bicycle gone? What am I doing wrong? Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Where is my bicycle?

2015-04-06 Thread Sean McBride
On Mon, 6 Apr 2015 11:36:38 -0500, Charles Srstka said: Objective-C doesn’t support Unicode in source files (although Swift does). Yes it does, and it has for many years too. Cheers, -- Sean McBride, B. Eng

Re: Where is my bicycle?

2015-04-06 Thread Charles Srstka
longCharacterIsMember: 0x1F6B2 ]; NSLog(@%s CharacterSet from \%@\ contains %s (0x1F6B2),__FUNCTION__, string, pq ? : no ); This prints: CharacterSet from abc  xyz contains no  (0x1F6B2) Where is my bicycle gone? What am I doing wrong? Objective-C doesn’t support Unicode in source

Re: Where is my bicycle?

2015-04-06 Thread Steve Mills
On Apr 6, 2015, at 11:45:52, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSString *string = @abc  xyz;// BICYCLE = U+1F6B2 If this is so: why did my compiler not tell me about this? NSString *string = @abc 〄 xyz;// JAPANESE INDUSTRIAL STANDARD SYMBOL =

Re: Where is my bicycle?

2015-04-06 Thread Charles Srstka
On Apr 6, 2015, at 11:49 AM, Sean McBride s...@rogue-research.com wrote: On Mon, 6 Apr 2015 11:36:38 -0500, Charles Srstka said: Objective-C doesn’t support Unicode in source files (although Swift does). Yes it does, and it has for many years too. Huh, I just checked the documentation,

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
On 6 Apr 2015, at 23:52, Steve Mills sjmi...@mac.com wrote: On Apr 6, 2015, at 11:45:52, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSString *string = @abc  xyz;// BICYCLE = U+1F6B2 If this is so: why did my compiler not tell me about this? NSString *string