Use mblen_l() to find number of code points in UTF-8 string instead of going 
via CFString.

The length returned from CFString was number of UTF-16 characters, so it would 
previously return a length of 2 for a surrogate pair, where mblen() will 
correctly result in 1. Diacritics though will still result in a star per 
combining character.

Though while testing this, the password dialog itself doesn’t handle neither 
surrogates nor diacritics correctly (when displaying these as stars).

Changed:
U   trunk/Tools/tm_interactive_input/src/dialog.c

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/listinfo/textmate-dev

Reply via email to