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]

Re: How should the yesexpr noexpr regexp look?


[Hamed Malek]
>> Should them always start with '^'?  Some locales do not have that.  At
>> least 'fa_IR' and 'wa_BE' do not start with '^'.  Should they?
>> 
> They should be fixed. The letters within brackets expression should only
> come at the beginning not everywhere.
> I've just sent a patch for fa_IR.

Lots of locales are missing the '^' at the start.  I'm working on a
script checking the locale content, and added a rule to detect this problem.

  af_ZA: yesexpr missing '^' prefix: "[jJ].*"
  af_ZA: noexpr missing '^' prefix: "[nN].*"
  bn_BD: yesexpr missing '^' prefix: "[হà§à¦¯à¦¾]"
  bn_BD: noexpr missing '^' prefix: "[না]"
  bn_BD: yesexpr missing '^' prefix: "[yYsSÕ¡Ô±].*"
  bn_BD: noexpr missing '^' prefix: "[nNÕ¸Õ].*"
  br_FR: yesexpr missing '^' prefix: "[oOyY].*"
  br_FR: noexpr missing '^' prefix: "[nN].*"
  ca_ES: yesexpr missing '^' prefix: "[sSyY].*"
  ca_ES: noexpr missing '^' prefix: "[nN].*"
  cy_GB: yesexpr missing '^' prefix: "[iItTyY].*"
  cy_GB: noexpr missing '^' prefix: "[nN].*"
  gd_GB: yesexpr missing '^' prefix: "[yY].*"
  gd_GB: noexpr missing '^' prefix: "[nN].*"
  gv_GB: yesexpr missing '^' prefix: "[yY].*"
  gv_GB: noexpr missing '^' prefix: "[nN].*"
  hy_AM: yesexpr missing '^' prefix: "[yYsSÕ¡Ô±].*"
  hy_AM: noexpr missing '^' prefix: "[nNÕ¸Õ].*"
  id_ID: yesexpr missing '^' prefix: "[yY].*"
  id_ID: noexpr missing '^' prefix: "[tTnN].*"
  ka_GE: yesexpr missing '^' prefix: "[1yYkKxXá®].*"
  ka_GE: noexpr missing '^' prefix: "[0nNaAá].*"
  kw_GB: yesexpr missing '^' prefix: "[eE].*"
  kw_GB: noexpr missing '^' prefix: "[nN].*"
  lg_UG: yesexpr missing '^' prefix: "[yY]"
  lg_UG: noexpr missing '^' prefix: "[nN]"
  mk_MK: yesexpr missing '^' prefix: "[ÐдDdYy1].*"
  mk_MK: noexpr missing '^' prefix: "[ÐнNn0].*"
  oc_FR: yesexpr missing '^' prefix: "[oOsS].*"
  oc_FR: noexpr missing '^' prefix: "[nN].*"
  ru_UA: yesexpr missing '^' prefix: "[ÐдYy].*"
  ru_UA: noexpr missing '^' prefix: "[ÐнNn].*"
  sk_SK: yesexpr missing '^' prefix: "[aAáÃyY].*"
  sk_SK: noexpr missing '^' prefix: "[nN].*"
  sr_YU: yesexpr missing '^' prefix: "[dDyY1].*"
  sr_YU: noexpr missing '^' prefix: "[nN0].*"
  sr_YU@cyrillic: yesexpr missing '^' prefix: "[ÐдYy].*"
  sr_YU@cyrillic: noexpr missing '^' prefix: "[ÐнNn].*"
  ur_PK: yesexpr missing '^' prefix: "[yYÙبf].*"
  ur_PK: noexpr missing '^' prefix: "[nNÙo].*"
  wa_BE: yesexpr missing '^' prefix: "[oOyYaAwW].*"
  wa_BE: noexpr missing '^' prefix: "[nN].*"

All of these should be fixed.  I'll prepare a patch adding the '^' to
all of them.

Other issues remain.  I suspect the '.*' at the end is completely
useless and should be removed. 283 regexes have this postfix.  It is
not in the default POSIX regex, so I believe it should be removed.

There is also the issue with missing 'yY' and 'nN' in the regex.  See
<URL:http://sources.redhat.com/bugzilla/show_bug.cgi?id=71> for a good
argument why the English letters should be part of the regex if
possible.  I'm starting to agree with the submitter on this.

And I am still not sure if '(sequence)' should be accepted as the
regex.

Should the regex accept zero ('0') and one ('1') as valid answers?
Some locales (18 regexes) include the numbers in the regex.  My
opinion is that it should not accept numbers.  The default POSIX value
only accept letters, and I believe the locale specific value should do
the same.


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