• 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: display unicode string one character at a time, actually quite simple after all
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display unicode string one character at a time, actually quite simple after all


  • Subject: Re: display unicode string one character at a time, actually quite simple after all
  • From: mathew davis <email@hidden>
  • Date: Thu, 19 Feb 2009 01:32:37 +1100

Do you have an example where the result of rangeOfComposedCharacterSequenceAtIndex is too wide?

um guess I was just plain wrong

Thank you Gerriet,

I'm actually not sure how I got that so wrong,
I've just run my code again and it's doing exactly what I want it to

I must have had a bug earlier today that just wasn't splitting strings at all.

thank you very much for taking the time to look at this for me and to write back.
I was absolutely convinced that rangeOfComposedCharacterSequenceAtIndex wasn't working the way I wanted.


regards Mathew

On 18/02/2009, at 10:02 PM, Gerriet M. Denkmann wrote:


On 18 Feb 2009, at 14:18, mathew davis <email@hidden> wrote:

ideally I'd like to break the string in to: the smallest possible segments which do not need to horizontally overlap when displayed in order to make sense to a reader.

so the composed character sequence:
g̈
U+0067 ( g ) latin small letter g
U+0308 ( ̈ ) combining diaeresis
would need to be one substring because the glyphs overlap horizontally
rangeOfComposedCharacterSequenceAtIndex sees this as one composed character. Just like you require.


the composed character sequence in Thai: เก
(adj. mischievous)

U+0E40 ( เ ) thai character sara e U+0E01 ( ก ) thai character ko kai

would ideally be broken into two substrings
rangeOfComposedCharacterSequenceAtIndex sees this as two composed characters.
ฺีBut why do you call it a composed character sequence? It is just a vowel + consonant.



but:
	 กึ
would have to be one substring
rangeOfComposedCharacterSequenceAtIndex sees this as one composed character.

In Thai you can get composed character sequences that look a bit like เกอะ

I do not think that this is a composed character. "เถอะ" which looks similar (but is a real word) is broken into 4 chars (just as you want it) by rangeOfComposedCharacterSequenceAtIndex.


At the moment i'm using rangeOfComposedCharacterSequenceAtIndex.
And if a sequence is too wide for my tile I scale it down.
Do you have an example where the result of rangeOfComposedCharacterSequenceAtIndex is too wide?


Kind regards,

Gerriet.


_______________________________________________

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


References: 
 >Re: display unicode string one character at a time, not at simple as it seems (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Is there a known bug in NSUrl?
  • Next by Date: Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation
  • Previous by thread: Re: display unicode string one character at a time, not at simple as it seems
  • Next by thread: Custom Google Search Engine for Mac OS X Developers
  • Index(es):
    • Date
    • Thread