[wp-hackers] Adding non English character ranges

Tom Barrett tcbarrett at gmail.com
Wed Oct 3 10:21:57 UTC 2012

On 3 October 2012 11:03, Ryan McCue <lists at rotorised.com> wrote:

> Tom Barrett wrote:
> > I have an A to Z list. It's a simple range('a','z') to loop through and
> > match against the first letter of post_title.
> >
> > This doesn't work for non English characters (e.g. Scandinavian æ/ae,
> ø/oe,
> > å/aa). What's the best way of handling this?
> >
> Depends on what you're trying to do, but remove_accents() (see
> wp-includes/formatting.php, ~L607) will convert these into their
> Romanised form or nearest approximation where possible.

It is for plugin functionality. I would like the user to be able to specify
the alpha range, and be able to match against them. Ideally, this would
mean not matching ø against o. Leave it as it's own unique character and
coming after z in the alphabet.

http://www.tcbarrett.com | http://gplus.to/tcbarrett |

More information about the wp-hackers mailing list