[2.0.11] Page Encoding

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
5
36%
Very Good
1
7%
Good
3
21%
Fair
1
7%
Poor
4
29%
 
Total votes: 14

pichirichi
Registered User
Posts: 83
Joined: Wed Jun 02, 2004 5:34 am
Contact:

Post by pichirichi » Thu Jun 16, 2005 6:43 pm

hayk wrote: I would match 3 basic problems in phpBB unicode port development:
1. Replacing all string functions on similar from MBS extension - mb_*. That's the main problem. Besides regular expressions incorrectly work with utf-8 text.
2. Converting of language’s files to utf-8 encoding.
3. Converting and adaptation DB (f/e adding of complementary fields).
I've done it. You can exam it here.


How did you get the search to work?
the highlight option is not working when the encoding is sets to UTF-8.

thanks

hayk
Registered User
Posts: 428
Joined: Tue Feb 04, 2003 10:53 am
Location: exUSSR
Contact:

Post by hayk » Thu Jun 16, 2005 7:27 pm

pichirichi wrote: How did you get the search to work?
the highlight option is not working when the encoding is sets to UTF-8.

I've made that using modifications of original sources.
Highlight option doesn't work but I still work on it.

pichirichi
Registered User
Posts: 83
Joined: Wed Jun 02, 2004 5:34 am
Contact:

Post by pichirichi » Thu Jun 16, 2005 7:34 pm

hayk wrote:
pichirichi wrote:How did you get the search to work?
the highlight option is not working when the encoding is sets to UTF-8.

I've made that using modifications of original sources.
Highlight option doesn't work but I still work on it.


I've just did some searches on your forum and managed to see the searched terms highlighted. So what code changes have you put in?


By the way, read my post above (previous page) on how to replace all the string functions with MultiByte functions without change and replace.

hayk
Registered User
Posts: 428
Joined: Tue Feb 04, 2003 10:53 am
Location: exUSSR
Contact:

Post by hayk » Thu Jun 16, 2005 7:56 pm

pichirichi wrote: I've just did some searches on your forum and managed to see the searched terms highlighted. So what code changes have you put in?

Yes, highlight works, but not correct.
Now I can't say what exactly I've changed, because there were a lot of changes. I can e-mail you the modified package.
pichirichi wrote: By the way, read my post above (previous page) on how to replace all the string functions with MultiByte functions without change and replace.

I've already read your post.

darakhshan
Registered User
Posts: 794
Joined: Fri Apr 30, 2004 7:18 pm

Post by darakhshan » Sat Dec 10, 2005 8:58 am

This is what I did

I downloaded the DB and used EMeditor, opened it and saved it again as utf-8 and resored my DB, in the same manner I changed all my lang file
my board is ok and is in utf-8 however I have a big issue I do not know how to solve and that is the subject, old posts have strange charecters on the subject line so when some body clicks on it the contents do not show and gets a blank page,

I have more than 300 topics so manually changing the subjest is impossible

any body can help me please

vanya_y
Registered User
Posts: 20
Joined: Mon Dec 05, 2005 8:46 am
Location: Ukraine
Contact:

Re: IMPORTANT INFO: UTF-8 - not that simple.

Post by vanya_y » Sat Dec 10, 2005 1:21 pm

pichirichi wrote: [*]Edit all e-mailslocated in the lang directory, replace the charset and save them as utf-8 (you can use ultraedit here as well).

Code: Select all

Charset: utf-8
There is an issue with the subject line (some charecters disappear, still looking for resolution).

In order to get correct UTF-8 subjects etc. we should encode them in this way:

Code: Select all

$new_subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";
May be we should create some PHP script for converting those subjects. Or may be just convert them on the fly when sending mails?
All other UTF-8 strings in mail headers should be encoded in such way too.

P. S. Don't you want, pichirichi, to create the MOD for all the changes you proposed here?

darakhshan
Registered User
Posts: 794
Joined: Fri Apr 30, 2004 7:18 pm

Post by darakhshan » Sat Dec 10, 2005 1:24 pm

ok I solved my subject problem as well

But :cry: New Problem :cry:

the Search function in my board does not work any more
The old posts can not be searched how ever when I post a new topic after the conversion I can find it through search

Any Idea :cry: :cry: :cry: :cry:

sickmusic
Registered User
Posts: 24
Joined: Fri Oct 25, 2002 1:22 pm
Location: London, UK
Contact:

Re: IMPORTANT INFO: UTF-8 - not that simple.

Post by sickmusic » Sun Feb 19, 2006 12:54 pm

vanya_y wrote:
pichirichi wrote:[*]Edit all e-mailslocated in the lang directory, replace the charset and save them as utf-8 (you can use ultraedit here as well).

Code: Select all

Charset: utf-8
There is an issue with the subject line (some charecters disappear, still looking for resolution).

In order to get correct UTF-8 subjects etc. we should encode them in this way:

Code: Select all

$new_subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";


hi i've got the same subject line prob, can someone please point me to the file where I do the above fix.

thanks.

THE-RAT-MAN
I've Been Banned!
Posts: 20
Joined: Sat Feb 25, 2006 7:33 am

UTF8 PHPBB

Post by THE-RAT-MAN » Sat Feb 25, 2006 9:54 am

hayk can i plzz have a copy of the one you have done plzz :lol:

is it phpBB-2.0.19 caz i have tryed all the above and all i get is errors 8O 8O
My email is phpbbgroup@hotmail.com
((why dont the phpbb group make a utf_8 phpbb :? :? :? :?

Mark Tøttrup
Registered User
Posts: 1
Joined: Thu Apr 20, 2006 9:47 pm
Location: Denmark

Re: IMPORTANT INFO: UTF-8 - not that simple.

Post by Mark Tøttrup » Sat May 20, 2006 10:23 pm

pichirichi wrote: [*]after the connect to db command the following code should be added:

Code: Select all

//
// Set charecters set parameters according to MySql version.
//
$result = mysql_query('SELECT VERSION()') or die('Query failed: ' . mysql_error());
$mysql_version = mysql_fetch_array($result, MYSQL_ASSOC);
list($mysql_version_majour,$mysql_version_minor,$mysql_version_patch) = split('\.',$mysql_version['VERSION()']);
if (($mysql_version_majour >=4) && ($mysql_version_minor>=1))
{
	$result = mysql_query('SET character_set_client = utf8') or die('Query failed: ' . mysql_error());
	$result = mysql_query('SET character_set_results = utf8') or die('Query failed: ' . mysql_error());
	$result = mysql_query('SET character_set_connection = utf8') or die('Query failed: ' . mysql_error());
}


Thanks for this guide. I hope you can help me out here: Where (exactly) does this code go? I'm on phpBB-2.0.19

I've done the conversion of the database and the lang/email files, but that only made things worse on my site. I'd appreciate any details you could give on the utf-8 conversion in UltraEdit. I've done the conversion under files->conversion->ASCII to UTF-8->save. Is this right? Nothing seems to happen?

Any help will be much appreciated!
/Mark
Area 51
Military Facility, Social Phenomenon, State of Mind and a popular symbol for the alleged U.S. Government UFO cover-up

spurrymoses
Registered User
Posts: 19
Joined: Mon Apr 25, 2005 2:33 am

Post by spurrymoses » Mon May 22, 2006 3:21 am

Thank you very much. This worked a treat for me.

I'm using 2.0.20 with a board that was already using utf-8 before I upgraded from 2.0.14.

The upgrade itself, ruined the printing of Japanese characters (utf-8) but it now works again thanks to this MOD.

Avi Laviad
Registered User
Posts: 6
Joined: Wed Apr 19, 2006 7:14 pm
Contact:

Post by Avi Laviad » Thu May 25, 2006 3:37 pm

i made the mod and everything worked fine.
the only problem is with the mailing,
when an auto mail sended to user about a post reply or with mass mail the encoding of the db's data (topic name, mass mail body) is not unicoded to utf.

any suggestions?

Kabil
Registered User
Posts: 2
Joined: Thu Aug 31, 2006 2:01 am

Post by Kabil » Thu Aug 31, 2006 2:21 am

Hi
I just changed my encoding to utf-8 as it was said on this MOD. but after wards my forum is showing a warning message like this
Warning: Cannot modify header information - headers already sent by (output started at /home3/senpakam/public_html/forums/language/lang_english/lang_main.php:2121) in /home3/senpakam/public_html/forums/includes/page_header.php on line 1001

Warning: Cannot modify header information - headers already sent by (output started at /home3/senpakam/public_html/forums/language/lang_english/lang_main.php:2121) in /home3/senpakam/public_html/forums/includes/page_header.php on line 1005

Warning: Cannot modify header information - headers already sent by (output started at /home3/senpakam/public_html/forums/language/lang_english/lang_main.php:2121) in /home3/senpakam/public_html/forums/includes/page_header.php on line 1007
My Forum URL: http://www.senpakam.com/forums

Even after I restore lang_main.php it is still there. :?

Can any one help me please. Thanks in advance

Kabil
Registered User
Posts: 2
Joined: Thu Aug 31, 2006 2:01 am

Post by Kabil » Fri Sep 01, 2006 5:29 pm

I have downloaded the orginal of the lang_main.php and uploaded it which resolved the problem but still i dont know what happened to it before :?

BlinkEye
Registered User
Posts: 5
Joined: Sun Nov 12, 2006 8:46 pm

Post by BlinkEye » Sun Nov 12, 2006 11:22 pm

if you set the language to UTF-8 and changed all iso-8859-1 charset settings in language/lang_english/email/* to UTF-8 you still have the mail subject issue (BAD HEADER). to get rid of that (i.e. send proper encoded emails) you may do the following 2 changes:


open includes/functions_post.php

and change:

Code: Select all

'TOPIC_TITLE' => $topic_title,
to

Code: Select all

'TOPIC_TITLE' => "=?UTF-8?B?" . base64_encode(mb_convert_encoding($topic_title,"UTF-8","auto")) . "?=",
'TOPIC_TITLE_BODY' => $topic_title,
open language/lang_english/email/topic_notify.tpl

and change the second TOPIC_TITLE to TOPIC_TITLE_BODY, like:

Code: Select all

Subject: Topic Reply Notification - {TOPIC_TITLE}
Charset: utf-8

Hello,

You are receiving this email because you are watching the topic, "{TOPIC_TITLE_BODY}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.

{U_TOPIC}

If you no longer wish to watch this topic you can either click the "Stop watching this topic link" found at the bottom of the topic above, or by clicking the following link:

{U_STOP_WATCHING_TOPIC}

{EMAIL_SIG}

Post Reply

Return to “[2.0.x] MOD Database Cleanup”