Recent Topics

National characters display problem, if logged out

Started by on Nov 15, 2006 – Contents updated: Nov 15, 2006

Nov 15, 2006 21:27    

Hi

I have strange problem with displaying national characters.
I write and post new message and everything is being displayed as it should be.
But when I log out I see national characters and quotation marks as "?" (without quotation).
I have no idea what could be wrong.

I have installed b2evolution 1.8.2 version, localization is set to Polish (utf-8). I'm using US version of Windows XP and Polish version of FireFox 2.0 browser.

I would be grateful for some help.

Regards
regres

Nov 16, 2006 01:11

Enable debugging (http://manual.b2evolution.net/Debugging) and look into the "locale" section.
Probably the blog's locale is not set to polish or something like that - but that would mean that you would see them also, when logged in.
Post the "locale" Debuglog section here, this should give us a clue.

Nov 16, 2006 01:32

Here is full output of debug section taken from App settings/Regional.
I hope it will help a bit.


locale:
default_locale from conf: en-EU
default_locale from DB: pl-PL-utf-8
default_locale from HTTP_ACCEPT: en-US
default_locale from user profile: pl-PL-utf-8
Set DB connection charset: utf8
evo_charset (_main.inc.php): utf-8
io_charset (_main.inc.php): utf-8

Nov 16, 2006 01:36

From what you've written you are having problems when logged out and therefor not in "App Settings/Regional" (because you're logged in there).

Please post _just_ the "locale" section and not the whole Debuglog of a page where the characters are wrong.

Nov 16, 2006 02:04

I don't quite get what you are asking me for, I'm rather new if speaking about this stuff :-/

I've corrected previous post so it shows only 'locale' settings.

I'm getting "?" characters instead normal Polish character on my main blog page when I log out. On that one where posts are being shown. There is no debug section under it and I don't know how to get this information.

When I'm logged in everything looks to be ok with Polish characters. When I press log out the post stays the same, only with "?" instead of Polish characters and quotations.

I would provide any necessary information if you only could tell me how...

Nov 16, 2006 02:17

If you don't get a Debuglog, after haveing enabled $debug, it's because you're missing a call to "debug_info()" in your skin at the end.
Look at the "custom skin" (the default one), how to put it and copy it from there.

We need the "locale" section, when the error appears.. the best would be to have the "locale" section of the Debuglog for both "logged in" (working) and "logged out" (not working), both on the front page of your blog.

Nov 16, 2006 02:58

Here is the part from logged-in state


    * default_locale from conf: en-EU
    * default_locale from DB: pl-PL-utf-8
    * default_locale from HTTP_ACCEPT: en-US
    * default_locale from user profile: pl-PL-utf-8
    * Set DB connection charset: utf8
    * evo_charset (_main.inc.php): utf-8
    * io_charset (_main.inc.php): utf-8
    * Activating blog locale: pl-PL-utf-8

and logged-out:


    * default_locale from conf: en-EU
    * default_locale from DB: pl-PL-utf-8
    * default_locale from HTTP_ACCEPT: en-US
    * Set DB connection charset: latin1
    * evo_charset (_main.inc.php): iso-8859-1
    * io_charset (_main.inc.php): iso-8859-1
    * Activating blog locale: pl-PL-utf-8
    * Adjusted I/O charset for blog
    * evo_charset: iso-8859-1
    * io_charset: utf-8

I can see the differences... but how and where can I change this?

Thank you very much for all your help and suggestions :)

Nov 16, 2006 20:18

I suggest setting $evo_charset to "utf-8" and $db['connection_charset'] to "utf8" in /conf/_locales.php.

Nov 17, 2006 00:23

Thank you very, very much, it seams to work perfectly now :D

Nov 17, 2006 00:38

Great. UTF-8 will save the world.. :)

Jan 31, 2007 16:22

I am getting a simular problem:

locale:
Could not "SET NAMES utf-8"! (MySQL error: Unknown character set: 'utf'(Errno=1115))
default_locale from conf: ja-JP
default_locale from DB: ja-JP
default_locale from HTTP_ACCEPT: en-US
default_locale from user profile: ja-JP
Set DB connection charset: utf8
evo_charset: utf-8
io_charset: utf-8

Any idea why it could not set names utf-8?

Jan 31, 2007 16:54

I found if I comment out these lines in the following 2 files:

_blog_main.inc.php

// Re-Init charset handling, in case current_charset has changed:
//if( init_charsets( $current_charset ) )

and

_main.inc.php

// Init charset handling:
//init_charsets( $current_charset );

it suddenly works and displays utf-8 correctly in Japanese.

Jan 31, 2007 18:54

It's "utf8" (not "utf") for MySQL. Something seems wrong in your DB::set_connection_charset() method - or you have not pasted the MySQL error correctly. If the second one is the case, then you have a too-old MySQL server (for this charset).
Try setting $db_config['connection_charset'] in some /conf/ file to e.g. empty or thelike.


Form is loading...

Multi-blog engine – This forum is powered by b2evolution CMS, a complete engine for your website.