Hi Peter,
On Sep 30, 2008, at 7:58 AM, Peter Edberg wrote:
CFStringGetRangeOfComposedCharactersAtIndex and -[NSString
rangeOfComposedCharacterSequenceAtIndex:] are the modern
replacements for UCFindTextBreak with kUCTextBreakClusterMask and
indeed they now are closer to the original intent
On Sep 28, 2008, at 11:17 AM, David Niemeijer wrote:
I need to be able to display the number of characters to the user in
a way that makes sense to them. If they see 3 I should report 3. I
also need it to cut-off certain input to the number of real
characters and should not generate
On Mon, Sep 29, 2008 at 12:52 AM, Michael Gardner [EMAIL PROTECTED] wrote:
But composed character sequences aren't the problem; surrogate pairs are.
Composed character sequences can be taken care of by using either
-precomposedStringWithCanonicalMapping or
Hi Douglas and Peter,
On Sep 29, 2008, at 6:39 PM, Douglas Davidson wrote:
On Sep 28, 2008, at 11:17 AM, David Niemeijer wrote:
I need to be able to display the number of characters to the user
in a way that makes sense to them. If they see 3 I should report 3.
I also need it to cut-off
On Sep 29, 2008, at 9:27 PM, David Niemeijer wrote:
Hi Douglas and Peter,
On Sep 29, 2008, at 6:39 PM, Douglas Davidson wrote:
On Sep 28, 2008, at 11:17 AM, David Niemeijer wrote:
I need to be able to display the number of characters to the user
in a way that makes sense to them. If they
On Sun, 28 Sep 2008 03:27:48 -0500, Michael Gardner
[EMAIL PROTECTED] wrote:
On Sep 27, 2008, at 2:23 PM, David Niemeijer wrote:
Hi,
I have been trying to find this in the documentation and list
archives but without success so far. What is the best way to count
the number of characters in
On Sep 28, 2008, at 5:53 AM, Gerriet M. Denkmann wrote:
On Sun, 28 Sep 2008 03:27:48 -0500, Michael Gardner [EMAIL PROTECTED]
wrote:
On Sep 27, 2008, at 2:23 PM, David Niemeijer wrote:
Hi,
I have been trying to find this in the documentation and list
archives but without success so far.
On Sat, Sep 27, 2008 at 3:23 PM, David Niemeijer [EMAIL PROTECTED] wrote:
Hi,
I have been trying to find this in the documentation and list archives but
without success so far. What is the best way to count the number of
characters in an NSString taking account of the fact that some
Michael,
On 28 sep 2008, at 14:41, Michael Gardner wrote:
Upon further investigation, I may be wrong. I based my assertion
upon Apple's NSString documentation (Returns the number of Unicode
characters in the receiver), and upon some quick tests I ran. But
this reply made me look into the
On Sun, Sep 28, 2008 at 2:17 PM, David Niemeijer [EMAIL PROTECTED] wrote:
I need to be able to display the number of characters to the user in a way
that makes sense to them. If they see 3 I should report 3. I also need it to
cut-off certain input to the number of real characters and should not
Users don't see characters, they see glyphs. If you want your count to
maximally agree with user perception, you need to be counting glyphs,
not characters.
See NSLayoutManager, esp:
- (NSRange)glyphRangeForCharacterRange:(NSRange)charRange
-- and friends.
If you are showing
On Sep 28, 2008, at 12:02 PM, [EMAIL PROTECTED] wrote:
--
Message: 1
Date: Sun, 28 Sep 2008 20:17:26 +0200
From: David Niemeijer [EMAIL PROTECTED]
Subject: Re: How to count composed characters in NSString?
To: Cocoa-Dev List
On Sep 28, 2008, at 3:05 PM, Peter Edberg wrote:
David,
Check out CFStringGetRangeOfComposedCharactersAtIndex. It finds the
kinds of text boundaries that I think you are interested in. You
would just need to iterate over the string calling this for each
iteration to find the next
On Sep 28, 2008, at 1:17 PM, David Niemeijer wrote:
Michael,
On 28 sep 2008, at 14:41, Michael Gardner wrote:
Upon further investigation, I may be wrong. I based my assertion
upon Apple's NSString documentation (Returns the number of Unicode
characters in the receiver), and upon some quick
Sent from my iPhone
On Sep 28, 2008, at 21:52, Michael Gardner [EMAIL PROTECTED] wrote:
On Sep 28, 2008, at 1:17 PM, David Niemeijer wrote:
Michael,
On 28 sep 2008, at 14:41, Michael Gardner wrote:
Upon further investigation, I may be wrong. I based my assertion
upon Apple's NSString
15 matches
Mail list logo