Re: How to count composed characters in NSString?
Re: How to count composed characters in NSString?
- Subject: Re: How to count composed characters in NSString?
- From: "Kyle Sluder" <email@hidden>
- Date: Sun, 28 Sep 2008 14:41:45 -0400
On Sun, Sep 28, 2008 at 2:17 PM, David Niemeijer <email@hidden> 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 results that only make sense for a language like English where each
> 16 bits equals a single character.
Perhaps more information on why this is a requirement would be
helpful. Since it's apparent that you're going to be dealing with
languages other than English, there won't be only one set of rules for
you to follow. For example, in Dutch, IJ is one letter. In Spanish,
you might treat ll and ch as one letter or not, depending on which
region you're using and whether you're performing collation or just
counting the number of letters. If you can explain why counting
characters is important to your app, we might be able to help you
better.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden