Page 1 of 1

strange character modification during posting

Posted: Thu Jun 28, 2007 7:33 pm
by gizmen

When RC1 was relased i have upgraded my old forum (2.0.22). Everything was fine. No errors, all data are in place... no problem with that.

But my problem is when i want to write a post. My native language is polish and my forum is in polish. When i write post with polish chars and send post it becomes corrupted. What is strange it is corrupted after polish char occur and sometimes one char is replaced by "?" but on black background sometimes couple of chars.
The second thing is that not always that occur. I have tried many times and sometimes chars are correct other time they are corrupt.

I am using freebsd 6.2 with php 5.2.3 with apache 2.2.4
I have pcre with utf-8 and mbstring.
What i have found is when i turn off mbsting extension from php.ini everything is ok. I have ran forum for a week without mbstring and there was no errors in posts. But then i have found out that mbstring is needed for other software on my system and i had to turn it on again. And again wrong chars becomes to show. Users started to complain that their posts are corrupted in a way that it is hard to read. Not only polish chars are changed to "?" but even regular ASCII one but alway after the polish char.

I have even changed
if (extension_loaded('mbstring'))
if (!extension_loaded('mbstring'))

in includes/utf/utf_tools.php

But it solved this errors little bit. Right now these wrong chars shows little bit less often. But still it happens.

When i edit those posts in phpmyadmin to the correct chars, forum shows them correctly. But when i write posts with forum and send them quite often they are corrupted. And when i check those posts in phpmyadmin those strange chars shows too.

So my question is what can be wrong ? Why when i do not load mbstring with php everything is ok ?

I have correct settings for mbstring like that:
mbstring.http_input = pass
mbstring.http_output = pass
mbstring.encoding_translation = Off
mbstring.substitute_character = ?;
mbstring.func_overload = 0

what else can i do to fix this ??? please help me :)

Re: strange character modification during posting

Posted: Fri Jun 29, 2007 12:38 pm
by Lastof
What is the character encoding set to on your database?

Re: strange character modification during posting

Posted: Fri Jun 29, 2007 3:14 pm
by gizmen
My database is UTF-8. Everything is UTF-8 (collation, client connection, server)
It is not a database problem. Something is wrong with posting or with mbstring ext.

Re: strange character modification during posting

Posted: Sat Jun 30, 2007 10:01 pm
by gizmen
So nobody can help me or point to some trick (hack) with this bug ?
That is very sad :( I didn't have any problems with 2.x version of forum thou it was full UTF-8 converted....

Re: strange character modification during posting

Posted: Sun Jul 01, 2007 2:32 pm
by cybrid23
One thing you need to remember, you are running a 'Release Candidate' verision of phpbb3...

You are currently running the first Release Candidate and as such, you are going to run into some issues from time to time. Currently, RC2 is the latest version which fixes issues found in RC1.

I do not know if this issue is fixed in RC2, but you may want to try it. Don't expect the RC versions to run perfectly. If it ran perfect under phpBB 2.x, and started when you installed the RC1 version, i expect it is an issue with RC1 which will be fixed in later RC revisions....

Re: strange character modification during posting

Posted: Sun Jul 01, 2007 2:44 pm
by gizmen
Yes i know that this is RC. Actually i have upgraded to RC2 and this issue still persist. But still RC is not a beta and posting is main function of forum so this should work without any flaws. And i am surprised that anybody else don't have similar problems.

Could anybody tell me where should i change in code that forum always use native utf8 support ? Is this in one place or i have to change in more than one place ?