Welcome Guest, Not a member yet? Register   Sign In
Problems with chinese characters
#1

[eluser]Unknown[/eluser]
hi Guys!
i'm new here and i'm writing for a problem with chinese character and CI

SITUATION
I have a multilingual site with an admin zone; in admin the user can insert english and chinese text.
Admin is not in CI and everything is working. i can store and retrieve correctly chinese characters.
i save everything in utf-8 and i can save to db, retrieve correctly and see everything(text and ideograms).

In frontend: i have a demo page outside codeigniter; in this very simple php page i retrieve all data(english and chinese) and i show in a uft-8 page; everything works. i dont use anything of CI here but simple php code.

In frontend with CI: in the chinese lang file i write everything in chinese and i can see correctly the static text in every page.
the problem is when i try to retrieve chinese text from the database; the result is the utf-8 code and not ideograms.

CONFIG
i have utf-8 charset in the page
$config['language'] = 'english';
$config['charset'] = 'utf-8';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
$active_group = 'default';
$active_record = TRUE;

The problem is that i dont see the chinese characters but the utf-8 code as here: 星期四
but if i put these chars in http://software.hixie.ch/utilities/cgi/u...f8-decoder and i launch the decoding i can see the correct chinese characters.

it seems something wrong in the select from the db in the model or in the view, i'm using active record and the select is a "select * from mytable".
The result is a result_array and i didnt find differences from result() and result_array().
in these result set i find utf-8 elements but i cannot see ideograms in the page.

any suggestions? have i to make other conversions?

thank you very much for all guys!

UPDATE
Resuming, i retrieve from the model the utf8 encoding of my string... but i cannot convert in ideograms in the page...


Messages In This Thread
Problems with chinese characters - by El Forum - 03-06-2012, 08:50 AM
Problems with chinese characters - by El Forum - 03-07-2012, 10:49 PM
Problems with chinese characters - by El Forum - 03-08-2012, 01:16 AM
Problems with chinese characters - by El Forum - 06-10-2013, 11:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB