Topic: Hack for having extern.php output UTF-8

I am using the following php code for outputting the most recent posts in my forum on my wordpress-running frontpage http://www.kukua.dk (bottom, right-most corner):

<?php
$_GET['action'] = 'new';
$_GET['show'] = '3';
include('forum/extern2.php');
?>

As you can see on www.kukua.dk extern.php does not output UTF-8 as the rest of the page, so non-standard and foreign characters do not show up right.

I was wondering if someone could help me change extern.php for version 1.2.x to output UTF-8?

I have looked at http://dev.punbb.org/browser/branches/p … hp?rev=890 but have very little knowledge of PHP so was not able to apply the changes there to the 1.2.x version of extern.php that I am running.

Any help is much appreciated.

Re: Hack for having extern.php output UTF-8

This may or may not work, but it's the only way I could think of to pull out UTF-8 data from iso-8859-1 without massive changes to the code.
extern.php
FIND

// Load DB abstraction layer and try to connect
require PUN_ROOT.'include/dblayer/common_db.php';

AFTER, ADD

$db->query('SET NAMES UTF8');

3 (edited by helstegt 2008-03-05 12:49)

Re: Hack for having extern.php output UTF-8

Thanks a lot for your help and time. Unfortunately I get no output at all on www.kukua.dk after adding that bit of code.
I guess I'll just have to wait for 1.3.

Edit: I do, though, after adding a ; after your line, and it works.

Thank you very much!