Can't get the unicode character


Posted on 16th Feb 2014 07:03 pm by admin

I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex) and I've got this:

64 72 e6 62 65 72 (without spaces)

Did you know?Explore Trending and Topic pages for more stories like this.
I'm converting that back by:

Code: <?php
function hex2bin($h)
{
if (!is_string($h)) return null;
$r='';
for ($a=0; $a<strlen($h); $a+=2)
$r .= chr(hexdec($h{$a}.$h{($a+1)}));

return $r;
}
?>

It works fine, except for unicode characters. For example, the above hex is giving me:

dr�ber

While it must be:

dræber

How can I get the correct word?
Thanks
No comments posted yet

Your Answer:

Login to answer
219 Like 34 Dislike
Previous forums Next forums
Other forums

Adding Different Numbers From MySQL
Basically I have a mysql database with a couple prices as the following:

9.99
9.99
9.99

LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a

Output Full URL of Current Page
Let's say I am currently viewing a dynamic page:

http://www.mydomain.com/directory/index.php

need help with php get
i have a option box that gets filled with dates, but how do i get once the option value has been cli

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

what does this mean? +=
is anyone able to explain what this code is saying?

i had it written for me awhile back and n

Preg_match with an array
is there an away to use preg_match with an array?

i want to check a string with an array to s

Need help with basic sql
Hi,

I am using oracle 10g, and having some small doubts related to sql , here goes the si

Port scanner problem
Hai
recently i developed one app through which u can check the opened and closed ports under an

losing variables between php brackets
Hi

have got this code:
Code: $id=mysql_result($result,0,"itemid");
$title=mys

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash