Recent Topics

[1.8]Several problems with ecoding

Started by on Jul 19, 2006 – Contents updated: Jul 19, 2006

Jul 19, 2006 15:39    

1)
_locales.php

Code

-------------------------
$default_locale = 'ru-RU';
$locales = array(
     'ru-RU' => array( 'name' => NT_('Russian (RU)'),
     'charset' => 'windows-1251', ......
                  ),
-------------------------

2) .../locales/ru_RU/_global.php in the "windows-1251'"

3) In the back-office in Russian locale "windows-1251" i see back-office :(
4) In the front front :(

if $evo_charset = 'windwos-1251';
Debug info:

Code

locale:
    * default_locale from conf: ru-RU
    * default_locale from DB: en-EU
    * default_locale from HTTP_ACCEPT: ru-RU
    * Could not "SET NAMES cp1251"!
    * evo_charset (_main.inc.php): windows-1251
    * io_charset (_main.inc.php): windows-1251
    * Activating blog locale: ru-RU

if $evo_charset = '';

Code

locale:
    * default_locale from conf: ru-RU
    * default_locale from DB: en-EU
    * default_locale from HTTP_ACCEPT: ru-RU
    * Could not "SET NAMES cp1251"!
    * evo_charset (_main.inc.php): windows-1251
    * io_charset (_main.inc.php): windows-1251
    * Activating blog locale: ru-RU

Jul 19, 2006 21:40

We've tried it together on another host, with a MySQL version (>= 4.1) which supports "SET NAMES", but the problem persisted: the text coming from DB is not cp1251 really.

I've fixed now a several things, which I'll commit later, but a single fix I've made, might help in your case:
Find function convert_chars in /inc/_misc/_misc.funcs.php and replace

Code

// Convert highbyte non ASCII/UTF-8 chars to urefs:
if( $evo_charset != 'utf-8' && $evo_charset != 'gb2312' && $evo_charset != 'windows-1251' )
{ // This is a single byte charset

with:

Code

// Convert highbyte non ASCII/UTF-8 chars to urefs:
if( ! in_array($evo_charset, array('utf-8', 'gb2312', 'windows-1251') ) )
{ // This is a single byte charset

I wasn't aware a long time, that the characters have been replaced with entities in the source code.. :/

Jul 20, 2006 09:36

All work OK!
Thank you enormous :)).


Form is loading...

CMS + forums – This forum is powered by b2evolution CMS, a complete engine for your website.