diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-03-15 15:16:57 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-03-15 15:16:57 +0000 |
commit | ab29ab8b3f271d8fbb2ac861a4644e5a4e29b81a (patch) | |
tree | 8fef4c497c87430cd2b87479da32b0334cc550b3 | |
parent | ecf4321e6e2eb79abd48d787cdb37abb48a283a7 (diff) | |
download | zsh-ab29ab8b3f271d8fbb2ac861a4644e5a4e29b81a.tar.gz zsh-ab29ab8b3f271d8fbb2ac861a4644e5a4e29b81a.tar.xz zsh-ab29ab8b3f271d8fbb2ac861a4644e5a4e29b81a.zip |
Fix lower casing of option names in some locales.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/options.c | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index fb2a3f5cc..5e3fb4ae3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-15 Peter Stephenson <pws@csr.com> + + * 23219: Src/options.c: Ismail Dönmez reported that lower + casing of I to dotless i in tr_TR.UTF-8 broke option handling. + 2007-03-14 Clint Adams <clint@zsh.org> * 23215: Completion/Unix/Command/_module: completion for diff --git a/Src/options.c b/Src/options.c index d0474498c..89178b313 100644 --- a/Src/options.c +++ b/Src/options.c @@ -603,7 +603,14 @@ optlookup(char const *name) if (*t == '_') chuck(t); else { - *t = tulower(*t); + /* + * Some locales (in particular tr_TR.UTF-8) may + * have non-standard mappings of ASCII characters, + * so be careful. Option names must be ASCII so + * we don't need to be too clever. + */ + if (*t >= 'A' && *t <= 'Z') + *t = (*t - 'A') + 'a'; t++; } |