Page 1 of 1

Problem with encoding in php site

Posted: Fri May 15, 2009 10:38 am
by shakera
Hi guys,

I'm not completely sure that this is the right place for my problem, but I think that you'll be able to help me.
Here's the problem. I have wordpressMU and buddypress installed. You can check it here: http://freelanceforum-bg.com/social/. I want some of the stuff translated into bulgarian(thats a cyrillic langauge) - the menus, the titles of the widgets, the footer and so on. So, I began translating the text directly in the php files of the current theme. Here's an excerpt from the header.php file, where the menu is:

Code: Select all

<div id="header">       
        <h1 id="logo"><a href="<?php echo get_option('home') ?>" title="<?php _e( '??????', 'buddypress' ) ?>"><?php bp_site_name() ?></a></h1>
        
        <ul id="nav">
            <li<?php if ( bp_is_page( 'home' ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>" title="<?php _e( '??????', 'buddypress' ) ?>"><?php _e( '??????', 'buddypress' ) ?></a></li>


The problem is that the translated text looks like some kind of rhombs, instead of proper letters, as you can see in the site - the top menu and the footer. The encoding is set to UTF-8, the db charset is set to UTF8 as well and the db-collation is set to utf8_general_ci.
I'll be glad if someone can help. Thanks in advance!

Re: Problem with encoding in php site

Posted: Fri May 15, 2009 10:47 am
by ldougherty
Is this on a Windows or Linux server?

Where did you set the encoding?

Re: Problem with encoding in php site

Posted: Fri May 15, 2009 11:00 am
by shakera
It's a linux server.

I have this code in the wp-config.php file which is the configuration file for wordpressMU.

Code: Select all

define('DB_CHARSET', 'utf8');
define('DB_COLLATE', 'utf8_general_ci');
And about the encoding - it is set in a field named "Encoding for pages and feeds" in the admin CP in wordpress.

Re: Problem with encoding in php site

Posted: Fri May 15, 2009 12:38 pm
by shakera
I solved it. Thanks anyway :)