How should the yesexpr noexpr regexp look?

Petter Reinholdtsen pere@hungry.com
Sat Mar 13 20:58:00 GMT 2004


I'm looking at the
<URL:http://sources.redhat.com/bugzilla/show_bug.cgi?id=71>, reporting
that the regexp for yes and no are broken for some locales, and
started to check out some locales which I am more familar.  This in
turn got me woundering how these regular expressions should look.

  for i in C no_NO nn_NO; do echo $i; LC_ALL=$i locale -c yesexpr noexpr; done
  C
  LC_MESSAGES
  ^[yY]
  LC_MESSAGES
  ^[nN]
  no_NO
  LC_MESSAGES
  ^[JjYy].*
  LC_MESSAGES
  ^[Nn].*
  nn_NO
  LC_MESSAGES
  ^[JjYy].*
  LC_MESSAGES
  ^[Nn].*

Notice the '.*' at the end of the no_NO and nn_NO locales.  It seem
like a waste to me.

Anyone know what these should contain?  Should the 'Yy' and 'Nn'
always be part of the regex, like Pablo Saratxaga suggests in the bug
report?

Should them always start with '^'?  Some locales do not have that.  At
least 'fa_IR' and 'wa_BE' do not start with '^'.  Should they?

I guess these things should be documented somewhere. :)



More information about the Libc-locales mailing list