This is the mail archive of the libc-locales@sources.redhat.com mailing list for the GNU libc locales project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How should the yesexpr noexpr regexp look?


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. :)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]