• 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: Best guess at expressing a string as a variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best guess at expressing a string as a variable


  • Subject: Re: Best guess at expressing a string as a variable
  • From: Jean Suisse <email@hidden>
  • Date: Wed, 23 Jan 2013 12:40:38 +0100

On 23 janv. 2013, at 02:18, "email@hidden" <email@hidden> 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 (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


  • Follow-Ups:
    • Re: Best guess at expressing a string as a variable
      • From: Fritz Anderson <email@hidden>
    • Re: Best guess at expressing a string as a variable
      • From: "email@hidden" <email@hidden>
References: 
 >Best guess at expressing a string as a variable (From: "email@hidden" <email@hidden>)
 >Re: Best guess at expressing a string as a variable (From: Jean Suisse <email@hidden>)
 >Re: Best guess at expressing a string as a variable (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: Best guess at expressing a string as a variable
  • Next by Date: Re: Best guess at expressing a string as a variable
  • Previous by thread: Re: Best guess at expressing a string as a variable
  • Next by thread: Re: Best guess at expressing a string as a variable
  • Index(es):
    • Date
    • Thread