1

Topic: Problem with writing cyrillic

When I try to post reply in cyrillic, I receive this message :
Info

Messages must not contain only capital letters and special characters in this forum.

I can write in cyrilic only if I am administrator. In lang/en/en_common.php, encoding is set to :

'lang_encoding'            =>    'windows-1251',

Are there more places where I should change encoding? Is the problem in MySQL (but when I'm administrator and I post in cyrillic, it all works).

jUzt m3 ...

2

Re: Problem with writing cyrillic

????? ?????? ???????

? ????, ??? ?????? 1.0.1 ? ?????? ????????? ? post.php

????:

!preg_match("/([a-z])/",$subject)

???????? ??:

!preg_match("/([a-z?-?])/",$subject)

?.?. ???????? ??????? ???????? ?????. ? ???? ??????.
?? ???? ?????? ?????? ?????? ?? ??????.

? ???? ????????? ???-8, ??, ?????, ??? ?? ?????????????.

P.S. ??????, ??? ???? ?? ??????. :-)

Big Brother is not watching you, Big Brother is testing you

Re: Problem with writing cyrillic

What is the correct encoding for russian? Is it windows-1251? Does that apply to the whole of russia?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4 (edited by nyuk 2004-03-17 13:22)

Re: Problem with writing cyrillic

In Russia more 6 encoding tables. The most popular: windows-1251 and koi8-r.

http://php.net/convert_cyr_string

Big Brother is not watching you, Big Brother is testing you

Re: Problem with writing cyrillic

Hmm, ok. Is that a problem for PunBB users?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6

Re: Problem with writing cyrillic

Yes. Without fixes Not all works correctly.

Big Brother is not watching you, Big Brother is testing you

7

Re: Problem with writing cyrillic

I solved the problem with kind a stupid decision ... Just :
    // else if ($pun_config['p_message_all_caps'] == '0' && strtoupper($message) == $message && $cur_user['status'] < PUN_MOD)
    //    message($lang_post['No caps message']);

I think this is not the best decision but I need forum now and don't have a lot of time to think for another decision. By the way thiz forum is very good made and I think you should "Keep developing" ... And success smile

jUzt m3 ...

Re: Problem with writing cyrillic

Instead of commenting out code, you should just be able to disable the two features "All caps message" and "All caps subject" in admin/permissions. That should do the trick.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

9

Re: Problem with writing cyrillic

Thanks, it works ... Is the forum check for SMTP service when posting, because I found it don't work with fake mail servers (for example b1tchX@rtfm.com) or why it gives me message for mail that don't exists  ... And why does the forum don't update number of posting, when I deleted one of moderators` postings, it continue ti show his old number.

jUzt m3 ...

Re: Problem with writing cyrillic

blade wrote:

Is the forum check for SMTP service when posting, because I found it don't work with fake mail servers (for example b1tchX@rtfm.com) or why it gives me message for mail that don't exists

I'm sorry, but I don't understand the question.

blade wrote:

And why does the forum don't update number of posting, when I deleted one of moderators` postings, it continue ti show his old number.

Because the post counter displays the number of posts a user has made, not the number of posts that are currently in the database.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

11 (edited by adsh 2004-04-09 00:55)

Re: Problem with writing cyrillic

There is no problem with post reply in cyrillic. After installing ru-lang pack with this code in ru_common.php:

// Determine what locale to use
switch (PHP_OS)
{
    case 'WINNT':
    case 'WIN32':
        $locale = 'russian';
        break;

    case 'FreeBSD':
    case 'NetBSD':
    case 'OpenBSD':
        $locale = 'ru_RU.CP1251';
        break;

    default:
        $locale = 'ru_RU';
        break;
}

// Attempt to set the locale (required for fulltext indexing to work correctly)
setlocale(LC_CTYPE, $locale);

// Language definitions for frequently used strings
$lang_common = array(

// Text orientation and encoding
'lang_direction'        =>    'ltr',    // ltr (Left-To-Right) or rtl (Right-To-Left)
'lang_encoding'            =>    'windows-1251',
'lang_multibyte'        =>    false,

Forum works fine with russian without this pack, when you set default encoding CP1251 in MySQL config (or - at compiling).

12

Re: Problem with writing cyrillic

If I change $locale = 'russian' with my local language, I suggest it should work also.

jUzt m3 ...

13

Re: Problem with writing cyrillic

$locale = 'russian'

is Win32 option in code above. Are you use Windows smile?

14

Re: Problem with writing cyrillic

My 5 cents: this page contain such a tag:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

So, russian text is unreadable, as the example, in Netscape 4.
Latest versions of Mozilla & IE can ignore this html tag, and they can overwrite it, but this is incorrect to hard setup charset for the multilanguage forum.

Re: Problem with writing cyrillic

DmitryM: True. However, a page must have a charset declaration to validate, so we don't have much choice.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

16

Re: Problem with writing cyrillic

Rickard>  True. However, a page must have a charset declaration to validate, so we don't have much choice.

No, charset can be missed. Not by standards, but this is life... wink
A webbrowser will select a default charset, so a surfer can be read all texts with his native language. And will not have any problems to change charset on multilanguage pages.

Multilanguage pages can contain many languages on one html page (as in our case). The charset should be omitted on such pages. This will not corrupt the content of page.

Re: Problem with writing cyrillic

I'm sorry, but the russian forums are here because they were requested. I'm not going to remove the charset declaration and break the validation because it causes problems with old Netscape versions.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

18

Re: Problem with writing cyrillic

Òî æå ìíå, ðóññêèé ôîðóì...

19

Re: Problem with writing cyrillic

i add to config.php

header('Content-Type: text/html; charset=windows-1256');

see that
http://punbb.org/forums/viewtopic.php?id=3717

If your people come crazy, you will not need to your mind any more.