On 23 janv. 2013, at 02:18, "jonat...@mugginsoft.com" <jonat...@mugginsoft.com> wrote:
>>> >>> My current thinking is, regardless of the language, is to exclude all >>> characters that are not members of NSCharacterSet + (id)letterCharacterSet. >>> >>> Is + (id)letterCharacterSet the best choice here? >> >> I don't know. Does it include characters in "すごくやる気がある" ? > That is the question. I don't know what range of character ranges + > letterCharacterSet includes. > A better question might be what is the intended use of + letterCharacterSet. > Is it locale dependent? > That's a fair question. As Jens Alfke pointed out yesterday, the doc states: Return value: A character set containing the characters in the categories Letters and Marks. Discussion : Informally, this set is the set of all characters used as letters of alphabets and ideographs. So, it should not depend on the locale. It is however a huge set ! And I guess that you may not want most of it (all chinese ideograms for instance) > > Hmm. Maybe not. I want to keep the generated variable name legible. > I think I will have to introduce an intermediate NSTextView that filters and > displays the natural language input. > The user can then modify the variable name if necessary before it gets > utilised further. Maybe you could drop the extra textfields and the processing by requesting the variable name to use an english alphanumeric character set ? Otherwise, how would you deal with this input for a variable name: 名前 ? [ If I am a japanese user, I would expect your software to call the variable "namae" ]. IMHO the whole unicode character set is too large. Most language won't accept the largest part of the set. Jean ----------- Jean Suisse Institut de Chimie Moléculaire de l’Université de Bourgogne (ICMUB) — UMR 6302 _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com