Topic: extern.php with utf8 db & utf8 wordpress, but iso display : a solution

I'm one of the many extern.php file user. The point is to display the lasts posts made to my forum in my wordpress blog.

But since I'm french, my friends like to write in french too. Using utf8 both in the mysql database (4.12) and wordpress (1.52), I was annoyed since I cannot display datas in the correct way; "é", "à" and so one where systematically converted to a "?", a "feature" of the iso encoding.

How to :

1/ go to extern.php, line 247
2 / add the following line :
                               $cur_topic['subject'] = utf8_encode($cur_topic['subject']);
3/ that's all smile

Re: extern.php with utf8 db & utf8 wordpress, but iso display : a solution

Only if you let PunBB use the obsolete Latin1 charset. If you use utf8 with PunBB, no need for another encoding wink

Re: extern.php with utf8 db & utf8 wordpress, but iso display : a solution

Pretty strange : I already use a utf8 encoding for my database...

4

Re: extern.php with utf8 db & utf8 wordpress, but iso display : a solution

No, not Mysql. PunBB.
It's in lang/YOURLANG/common.php in line 32:

'lang_encoding'            =>    'iso-8859-1',

Change that value to utf8 and you should be done.

The German PunBB Site:
PunBB-forum.de

5 (edited by Psykotik 2005-09-30 11:48)

Re: extern.php with utf8 db & utf8 wordpress, but iso display : a solution

Thanks Tobi, but it didn't work for me... whereas the trick I explained worked like a charm.

Re: extern.php with utf8 db & utf8 wordpress, but iso display : a solution

Psykotik wrote:

I'm one of the many extern.php file user. The point is to display the lasts posts made to my forum in my wordpress blog.

But since I'm french, my friends like to write in french too. Using utf8 both in the mysql database (4.12) and wordpress (1.52), I was annoyed since I cannot display datas in the correct way; "é", "à" and so one where systematically converted to a "?", a "feature" of the iso encoding.

How to :

1/ go to extern.php, line 247
2 / add the following line :
                               $cur_topic['subject'] = utf8_encode($cur_topic['subject']);
3/ that's all smile

I'm trying to do the same thing

how do I do it?

Re: extern.php with utf8 db & utf8 wordpress, but iso display : a solution

I read inside .extern.php that you have to put

include('http://host.com/forums/extern.php?action=active');

but where do I put that?

Re: extern.php with utf8 db & utf8 wordpress, but iso display : a solution

where do i put this code to view my latest entrys in my wordpress blog?

include('http://host.com/forums/extern.php?action=new&show=10&fid=5,6,7');