Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

hello, i am doing a simple regex match on french word boundary. it appears that the \b won't match on a french word started or ended with a character with accent. such as Ayité failed the word boundary. Bhêly matches successfully however. i am reading it in as ISO-8859-1 encoding, not utf-8. how do i match word boundary in this case? thanks! James.

Replies are listed 'Best First'.
Re: word boundary on french accent
by ikegami (Patriarch) on Jan 16, 2007 at 21:39 UTC
    perlre and perllocale say use locale affects what \w matches. \b's definition is based on \w, so use locale should affect \b as well.