SSI.php problem with UTF-8 in Joomla: can't get to display characters right

Started by Kursk, April 26, 2009, 09:55:45 PM

Previous topic - Next topic

Kursk

Here's my setup: SMF 2.0 RC1 and Joomla 1.5.10. Unbridged.  Both UTF-8. All I need is to show latest topics (via SSI.php) on Joomla frontpage.

Making a custom module was not problem.  What I'm having a problem with is to display stuff in UTF-8.  For all the stuff SSI.php calls out of database I'm getting a bunch of question marks ? ? ? The rest of the stuff, such as dates, words "today", "yesterday" in my specific language, they are displayed correctly.

This same exact problem is described in this joomla hxxp:forum.joomla.org/viewtopic.php?p=1348731 [nonactive].  The solution suggested there apparently works, but not only for 1.1.x, not 2.0. It includes adding to ssi.php the following:

Quotemysql_query('set names utf8', $db_connection);

I've also found a reference that suggested including global $db_character_set; in ssi.php.  It didn't work for me.

Any help will be appreciated.

H

Sorry for the slow response, do you still require assistance with this?
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             


Jazmo

I'm sorry i'm answering this same topic, but my topic is pretty much the same.
My SMF is utf8, my webpage is utf8 .
I use SSI's ssi_recentPosts function, but i only use it for getting the data, i handle the printing myself.

All the special characters were not displayed on my webpage. Why? Where's the problem? My databases are in UTF8 too.

I got it corrected easily this way

// this is in my own printing function which has before gotten $posts -array from SSI and foreachs it as $post
<?php echo utf8_encode($post['link']); ?>


but you shouldn't need to do that, should you?

Jazmo

Ah so. I do not have that SET NAMES utf8. I read that it should be there but i didn't understand why. Now i visited Mysql website, and the idea became much clearer.
Thanks.

Aleksi "Lex" Kilpinen

Hi Kursk, have you managed to sort this out - or do you still need assistance on this?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: