...

View Full Version : ?? Unicode with PHP



~Fyodor
01-12-2008, 05:03 AM
I'm working on multi language based on PHP, But now my big problem is to convert an UTF-8 char to Unicode char. I'm try use mb_string but my server doesnt allow to use. What I have to do ?
Thanks for reading

ralph l mayo
01-12-2008, 05:59 AM
UTF-8 is Unicode.

ess
01-12-2008, 05:26 PM
UTF-8 supports most international characters.

Internally and by default, PHP uses iso-8859-1, which may not support the character sets that you wish to support. If your server supports mbstring, then you can change the default charset in php to utf-8 by executing the following command before any processing is performed

<?php mb_internal_encoding( 'UTF-8' ); ?>

Perhaps, it has something to do with the default headers set by your server.

To enforce utf-8, add this at the top of all of php documents, before any echo, or html tags.

<?php header('Content-Type: text/html; charset=utf-8'); ?>

To ensure that the correct charset has been selected, on firefox, click Tools -> Page Info...and make sure that it says utf-8 for encoding etc..

Cheers
~E

Inigoesdr
01-12-2008, 08:04 PM
If your server supports mbstring, then you can change the default charset in php to utf-8 by executing the following command before any processing is performed

<?php mb_internal_encoding( 'UTF-8' ); ?>


I'm try use mb_string but my server doesnt allow to use.
:thumbsup:

ess
01-13-2008, 02:10 PM
:thumbsup:
and your point is :confused:

I know that he/she said that his/her server does not support that functionality...and that is why I stated "If your server....etc."...so others, including himself/herself, with a similar requirements may find it useful...or perhaps he/she may reconsider their hosting provider so that they can switch to a host who provides such functionalities...etc.

I am not here to take the piss out of people, which you seem to be happy doing, nor expect people to take the piss out of me. I am simply here to learn, and help others where I can.

So please, keep your jokes, stupidity, mischief, etc. to yourself...as I don't think anyone here has come for your charm.

Inigoesdr
01-13-2008, 06:01 PM
I am not here to take the piss out of people, which you seem to be happy doing, nor expect people to take the piss out of me. I am simply here to learn, and help others where I can.

So please, keep your jokes, stupidity, mischief, etc. to yourself...as I don't think anyone here has come for your charm.

Did you have a bad day? That post is a bit strongly worded considering the circumstances. I didn't launch any personal attack on you. I pointed out that your post wasn't very useful, as this user obviously already knew about mb_string, and specifically stated that they couldn't use it. Even if you were posting the information for others mb_string had already been mentioned so at best you were rehashing information. I apologize if you took it personally, and I hope no one is here for my charm as they will be sorely disappointed. ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum