|
Posted by Tony Marston on 07/28/06 08:26
> Adam Harvey wrote:
>> How do you propose to deal with different alphabets and languages? It's
>> not uncommon for programming languages to allow variable names to be in
>> something other than US-ASCII -- indeed, this code (if saved as UTF-8, at
>> least; I can't vouch for other encodings) works in PHP, since it allows
>> variable names to include high-bit characters:
Do what has been done in various computer software for years - only allow
variable or objects names to use a restricted character set. I am used to
seeing such restrictions as
- first character must not be a number
- can only use characters A-Z, 0-9 and '_' (underscore)
If it is necessary to use UTF-8 characters then only allow those which are
the same in upper and lower case. Problem solved.
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Navigation:
[Reply to this message]
|