[wp-hackers] Unicode url rewriting using add_rewrite_rule()
otto at ottodestruct.com
Wed Dec 12 18:41:06 UTC 2012
On Wed, Dec 12, 2012 at 12:37 PM, Otto <otto at ottodestruct.com> wrote:
> On Wed, Dec 12, 2012 at 11:36 AM, Deepak Mittal <dpac.mittal2 at gmail.com> wrote:
>> However, this still doesn't work with unicode characters as I need to pass
>> a regular expression modifier 'u' with it. Any idea how I can do that?
> Sure. You can't. The regular expression used for rewrite rules doesn't
> contain the u modifier, and there is no option to add it.
> See class-wp.php, around line 205-ish.
BTW, unicode characters are not valid in URLs anyway. According to the
RFC (1738), only ASCII characters are allowed in URLs. Anything else
must be percent encoded.
Or a better explanation here:
More information about the wp-hackers