unicode to its orginal data

Reply

Join Date: Mar 2007
Posts: 11
Reputation: anitha2324 is an unknown quantity at this point 
Solved Threads: 0
anitha2324 anitha2324 is offline Offline
Newbie Poster

unicode to its orginal data

 
0
  #1
Mar 16th, 2008
Hi All
I have a question , i am doing small interface ( using php,mysql,IIS) , the data stored in the database as unicode data , now i want to retreive the data and display those data in php interface but it should not in unicode format ( so i need to convert it to it orginal data) so how to convert unicode to its orginal data



note the data stored in the table like this

Name
0245875224485



data should be displayed like this in ( php interface)

Name
Anitha



Needed urgently am newbie to php
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 100
Reputation: petr.pavel is an unknown quantity at this point 
Solved Threads: 14
petr.pavel's Avatar
petr.pavel petr.pavel is offline Offline
Junior Poster

Re: unicode to its orginal data

 
0
  #2
Apr 3rd, 2008
Hi Anitha,
I'm sorry but "0245875224485" isn't a unicode format for anything but "0245875224485".
"Anitha" in unicode would again be "Anitha". I guess that when you try to convert Unicode to some ISO charset you will find out that it didn't help.

But let's stick to your specs. To convert a string from UTF-8 (say we're talking about UTF-8 here; "unicode" is rather a general word and can mean more than one thing) to ISO-8895-2 (I don't know what your "original" charset was) you can use iconv() function:
  1. $converted_8895_2 = iconv("UTF-8", "iso-8859-2", $utf8_string);
Petr 'PePa' Pavel

The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum


Views: 520 | Replies: 1
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC