some charsets questions

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 7
Joined: Fri Nov 22, 2002 7:48 am

Fri Nov 22, 2002 11:38 am


My test platform is Apache2/PHP 4.2.2 as module/MySQL 3.23.49/ under Windows XP (Sofia, Bulgaria).

My default charset for MySQL is IS0-8859-1,
but i think ISO-8859-1 can't store cirillyc chars
so the real store is in win1251.

when i make a php/mysql query it seems that the result is
in win1251 characters.

... and the problem is that i want to output UTF-8 chars,
because i want to comunicate with flash mx.
utf8_encode didn't work because it expects ISO-8859-1.
mb_ functions also seems that can't convert win1251 to UTF-8.

If somebody can help me with my purpose to output UTF-8 chars
from my PHP/MysqL script or give me some references i'll be
very thaksfull.

Best regards, Stanislav

New php-forum User
New php-forum User
Posts: 7
Joined: Fri Sep 06, 2002 7:59 am
Location: Ukraine

Sat Nov 23, 2002 3:54 am


Try to use this:

Code: Select all

iconv_set_encoding("internal_encoding", "ISO-8859-1");
iconv_set_encoding("output_encoding", "UTF-8");

or somethig like this.

I'm from Bulgaria too :)
Bereza Nikita
Rapid Internet Development Department
Alar Information Technologies,

Post Reply