I’m using permalinks in WP as: domain.com/category/post_name
The issue is that post names have non-latin characters such as chinese, hebrew, and arabic. So it encodes them to something like: %20%18%6b%20
therefore it counts every symbol’s character as an actual character, ending up with 3x times more length that it truncates some very short slugs.
How to fix that? Or how to extend the length limit at least? I’ve tried to extend the length of the database field “post_name” from 200 to 500, But it’s still truncating short.
Permalinks like
http://example/שָ×××Ö¹×
are actually working in my WordPress 3.3. Could be the remove_accents() improvements for i18n permalinks.As Sean & Steve noted,
RewriteRule . /index.php [L]
[My original answer follows, not so relevant now but maybe still useful:]
See
If your post titles contain some ASCII characters, you can strip out non-ASCII characters when generating post slugs.
Some plugins may help:
http://wordpress.org/extend/plugins/strings-sanitizer/
http://wordpress.org/extend/plugins/universal-slugs/
http://wordpress.org/extend/plugins/pinyin-slug/
http://wordpress.org/extend/plugins/remove-utf-8-from-slug/
http://wordpress.org/extend/plugins/pinyin-seo/
Also, some of the multilingual plugins might be able to translate your slugs into English (and hence Latin-only characters) automatically, but I haven’t used any of them, so I’m not sure.
Apart from sanitizing, the only way to extend length of slug is modifying WP code
in file
wp-includes/formatting.php
:replace
200
accordingly:in file:
wp-includes/post.php
search for 3 lines with:The problem will hunt You down with each WP update