Topic: Big Letter "k" in russian

It doesn't work on this forum, it doesn't work on my forum too! Can smb help me?

2

Re: Big Letter "k" in russian

http://punbb.org/forums/viewtopic.php?id=6115

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

Re: Big Letter "k" in russian

I'm aware that it may be broken for posts that have already been made before the fix zaher linked to, but does it also happen with new posts?

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

Re: Big Letter "k" in russian

i don't know. i have punbb1.2 and i hope, that when i install v1.2.1 this problem will dissapear

Re: Big Letter "k" in russian

Could you try posting a russian K in these forums just to make sure?

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

Re: Big Letter "k" in russian

i did. but now i found some topics, where this problem has been discussing, and now i fixed this bug.

Re: Big Letter "k" in russian

i has found two solutions:

function pun_trim($str)
{
    $fishy_chars = array(chr(0x81), chr(0x8D), chr(0x8F), chr(0x90), chr(0x9D), chr(0xA0), ' ');

    return trim(str_replace($fishy_chars, ' ', $str));
}

and

function pun_trim($str)
{
        global $lang_common;

        if (strpos($lang_common['lang_encoding'], '8859') !== false)
        {
                $fishy_chars = array(chr(0x81), chr(0x8D), chr(0x8F), chr(0x90), chr(0x9D), chr(0xA0), chr(0xCA));
                return trim(str_replace($fishy_chars, ' ', $str));
        }
        else
                return trim($str);
}

are both of them are rigth?

Re: Big Letter "k" in russian

Huh? What you posted above (the second piece of code) is the code that is in PunBB 1.2.1.

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

9 (edited by Illukman 2005-02-10 05:55)

Re: Big Letter "k" in russian

may be. i don't know smile but is first piece of code rigth too?

Re: Big Letter "k" in russian

Your code? The two pieces of code you posted are from 1.2 and 1.2.1.

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

Re: Big Letter "k" in russian

no.  in the first piece there is not "chr(0xCA)" in code. but in 1.2 it is.

Re: Big Letter "k" in russian

Ah, I see. Still, you should use the second piece of code from 1.2.1.

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

Re: Big Letter "k" in russian

but why in that case are you write a special function pun_trim() if i must use usual trim()???

Re: Big Letter "k" in russian

Because when we're dealing with regular iso-8859-1 text, there are some additional characters I want to strip out.

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

Re: Big Letter "k" in russian

ok. it seems, that i have understood...

16

Re: Big Letter "k" in russian

The problem is still here! I have installed 1.2.12 over 1.2, but I can't print the big letter "k" (0xCA) in my forum. I thought the problem was solved in 1.2.4... It appears I was wrong. What should I do to correct this "bug"?