convert ascii to unicode

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
maldar
Forum Commoner
Posts: 49
Joined: Mon Aug 18, 2003 4:39 pm

convert ascii to unicode

Post by maldar »

How can i convert a string to unicode(or utf-8)?
is there any built-in php function? if is not how can i write one? please help me.Thanks in advance
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

maldar
Forum Commoner
Posts: 49
Joined: Mon Aug 18, 2003 4:39 pm

Post by maldar »

Thanks,
I did already check the pages you mentioned, but i need a simple function that embded in my project library files and do it for me without any extra installation.
User avatar
EvilWalrus
Site Admin
Posts: 209
Joined: Thu Apr 18, 2002 3:21 pm
Location: Springmont, PA USA

Post by EvilWalrus »

utf8_encode() exists... no addtional libraries needed.
maldar
Forum Commoner
Posts: 49
Joined: Mon Aug 18, 2003 4:39 pm

Post by maldar »

Thanks,
but it is not what i'm searching for .
exactly i want to convert string from one charset to another.(e.g:windows-1256 ->uincode(utf8) )
i have a file that contains all error and warnnig messages that written by windows-1256 charset and now i want to convert all my project pages encoding to unicode(utf8) and must rewrite all messages.i want a better and automatic way to avoid of rewriting.
Thanks for any useful help or suggestion
maldar
Forum Commoner
Posts: 49
Joined: Mon Aug 18, 2003 4:39 pm

Post by maldar »

could any one help me to solve this problem :?: :(
Thanks
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Because there are already functions available you are unlikely to find anyone wanting to reinvent the wheel and code them in PHP.

If you just need to convert your own project pages locally why not install the required libraries to do it?

Mac
maldar
Forum Commoner
Posts: 49
Joined: Mon Aug 18, 2003 4:39 pm

Post by maldar »

thus, more detail or an example on using utf8_encode() please.
i still have problem working it
Thanks
Post Reply