On 23 janv. 2013, at 00:28, "jonat...@mugginsoft.com" <jonat...@mugginsoft.com> 
wrote:


> I have a generic descriptive title of a parameter and want to express it as a 
> variable name within a script.
> 
> So if my title is "No more awesome today, please!" I will likely render this 
> as "no-more-awesome-today-please" ( I can define the separator style).
> 
> I am targeting about 20 or so scripting languages so the range of what each 
> will deem is a valid variable name is rather wide.
> However I would like to deliver a reasonable default rendering.
> 
> Dealing with English seems not too troublesome but titles composed in other 
> languages might be a different matter.

Do you want to deal with other languages ? For instance Japanese, Chinese, 
Korean, Arabic, etc. ?
> 
> 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 "すごくやる気がある" ?
I can only guess what your goal is. But can't you associate some unique 
variable name to strings you can't translate (for instance the hex 
representation of the bytes in the UTF8 string) ?

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

Reply via email to