KOI8-R/WIN-1258 support [message #7654] |
Sun, 08 December 2002 09:30 |
KVentz
Messages: 65 Registered: November 2002 Location: Moscow, Russia
Karma: 0
|
Member |
|
|
Hi!
There are at least two Cyrillic encodings: koi8-r (Unix) and win-1251 (Windows).
Historically preconceived that we use koi8 in mail and Usenet and win for web.
In this case there are some problems: first, "msg" file in thm/default/i18n/russian is in koi8-r. I must recode it to win manually after every upgrade. Problem can be solved by making two translations in i18n: russian-koi (for some Unix fans ) and russian-win. You can recode texts using "convert_cyr_string($var,'k','w')" php function.
Second problem is with Newsgroup Manager. By leaving "as is" nntp.php just doesn't work with messages with Cyrillic spells. The problem is in "apply_custom_replace($text)" in include/theme/default/replace.inc file. nntp.php just returns an error. I don't remember what exactly it says, but after next upgrade I'll send you an error message.
Using barbarian method "delete anything than doesn't work" I have changed apply_custom_replace($text) to:
function apply_custom_replace($text)
{
if ( !($arr = make_replace_array()) ) return convert_cyr_string($text,'k','w');
return convert_cyr_string($text,'k','w');
}
I just don't know, what this function does, but everything works with this terrible interference. Now there is no error message in replace.inc and I can read all messages in win in my forum.
Again and again thank you for the best forum I ever saw.
P.S.: sorry for bad English.
|
|
|
|
|
|
Re: KOI8-R/WIN-1258 support [message #7926 is a reply to message #7909] |
Sat, 28 December 2002 17:31 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Ideal solution would be to make another russian translation that would be based on windows-1251 encoding and then a user can choose what to use KOI8-R or windows-1251. Doing convert_cyr_string() in realtime will not only be slow but is simply impossible to do due to the nature of FUDforum's templating system.
FUDforum Core Developer
|
|
|
|
Re: KOI8-R/WIN-1258 support [message #7940 is a reply to message #7654] |
Tue, 31 December 2002 04:25 |
Anonymous
|
|
|
|
i'm not sure about locale for russian-1251 translation. it should be 'ru_RU.CP1251' for forum running on unix server. and just 'ru' for win32 platform. and i think there will be no aspell support in 1251 translation.
|
|
|
|
|
Re: KOI8-R/WIN-1258 support [message #7966 is a reply to message #7942] |
Fri, 03 January 2003 16:25 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
There is no pspell support for 1251 and it is not likely to be added. I did recieve the 1251 version of the russian translation and the next release will include both cp1251 and KOI8-R
FUDforum Core Developer
|
|
|