I write my blog in russian (Cyrillic), so the name of the post as usial not have latin letters. And permalinks in version 0.9 was generated in translit - thats grate!
When I has upgraded to 1.0 beta 2, all my permalinks is desappeared, now they look like "blog/archives/376-unknown.html" or "blog/archives/372-_8_!.html" (only spaces, digits and latin simbols)
Same problems with categories names in russian.
where is the bug? i`m in panik =(
problems with translited permalinks
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: problems with translited permalinks
Did you change anything in your SQL database maybe?
And when you try to use normal lating characters a-z, do the permalinks then work again? Do permalinks only stop to work for old entries, or for new entries as well?
Regards,
Garvin
And when you try to use normal lating characters a-z, do the permalinks then work again? Do permalinks only stop to work for old entries, or for new entries as well?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
No, i change nothing in sql database. And at first, when i look on table "permalinks", there was right names, but they don`t work on the site. I try to fix that problem with turning off/on the mode_rewrite option in admin panel (this method helped me with the same problem in beta 1 version), so table permalinks was rewrited with wrong names.
Yes, permalinks work right with latin characters and numerals, and all, old and new posts generates with bad permalinks.
Yes, permalinks work right with latin characters and numerals, and all, old and new posts generates with bad permalinks.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I think that recent 1.0 versions contained a change to use htmlspecialchars() or so for permalinks, because non-latin cahracters are not allowed in URLs.
Sadly I'm ill right now so I can't thorougly investigate it; but I'm afraid the change might be intentional because of problems with other languages like chinese where those characters might not show up in a URL conform to RFC
Regards,
Garvin
Sadly I'm ill right now so I can't thorougly investigate it; but I'm afraid the change might be intentional because of problems with other languages like chinese where those characters might not show up in a URL conform to RFC
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Seems to me we could add a bit to the language files. PHP supports a strtr() function that can do either characters or strings. If we do characters, we'll need two variables: a "from" string and a "to" string. If we do strings, we'll need an array with strings: 'ä' => 'a', 'ä' => 'a', etc.
Anything not handled in the translation could be removed by the existing code.
Whatcha think, Garvin?
Anything not handled in the translation could be removed by the existing code.
Whatcha think, Garvin?
Re: problems with translited permalinks
hi! i'm also using 1.0-beta2 and have such problem..Dimonius wrote:I write my blog in russian (Cyrillic), so the name of the post as usial not have latin letters. And permalinks in version 0.9 was generated in translit - thats grate!
When I has upgraded to 1.0 beta 2, all my permalinks is desappeared, now they look like "blog/archives/376-unknown.html" or "blog/archives/372-_8_!.html" (only spaces, digits and latin simbols)
Same problems with categories names in russian.
where is the bug? i`m in panik =(
please have a look at /serendipity/include/functions_permalinks.inc.php
there are two portions of code:
1) doing utf8_decode
Code: Select all
if (LANG_CHARSET == 'UTF-8') {
// URLs need to be 7bit - since this function takes care of the most common ISO-8859-1
// characters, try to UTF8-decode the string first.
$str = utf8_decode($str);
}
Code: Select all
if (isset($GLOBALS['i18n_filename_from'])) {
// Replace international chars not detected by every locale.
// The array of chars is defined in the language file.
$str = str_replace($GLOBALS['i18n_filename_from'], $GLOBALS['i18n_filename_to'], $str);
} else {
// Replace international chars not detected by every locale
$str = str_replace($from, $to, $str);
}
i don't know is it a bug or not..
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: problems with translited permalinks
Hi!
Thanks, this actually has been fixed in 1.0 SVN and the 1.1 versions, so it'll be contained in the 1.0 final release.
Best regards,
Garvin
Thanks, this actually has been fixed in 1.0 SVN and the 1.1 versions, so it'll be contained in the 1.0 final release.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: problems with translited permalinks
great! i'm waiting for 1.0 final release impatiently..garvinhicking wrote:Hi!
Thanks, this actually has been fixed in 1.0 SVN and the 1.1 versions, so it'll be contained in the 1.0 final release.![]()
off: s9y is the best, thanks for it!