On Fri, Oct 23, 2009 at 07:30:07PM +0200, David Lutterkort wrote: > > This series of patches addresses an issue with using libaugeas with non-C > locales (ticket #35). Augeas requires that all regular expressions are > interpreted in the C locale, in particular, things go horribly wrong for > character ranges like [a-z] when the locale is not C. This problem was so > far not visible with augtool and augparse, since they always used the C > locale. > > Unfortunately, the glibc (and gnulib) regexp matcher will always use the > current locale, and can't be told to use an explicit locale. > > The issue is addressed in two ways: > > * on systems that have uselocale(), we switch to the C locale every time > we enter through a public API function, and switch back to the old > locale on exit > * things are hairier (and more expensive) if the system doesn't have > uselocale(): there we resort to rewriting regular expressions ourselves > and expand character ranges before passing the regexps to the > matcher. The rewriting leads to some horendously big regular > expressions > > I'd be very thankful for any pointers to solving this short of writing my > own regexp matcher.
Would PCRE work for Augeas ? http://www.pcre.org/ http://en.wikipedia.org/wiki/PCRE Apparently this is the regex lib used by Apache, Exim & a bunch of other apps Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| _______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
