Try this:
<?php echo html_entity_decode("ࡏ
Make sure the HTML document you do this in has this in it's <head> section
<meta http-equiv="Content-Type" content="text/html; Charset=UTF-8">
Main Topics
Browse All TopicsHow to convert character like 北 to actual character?
Currently I got this code below to export data into csv file, however the data displayed as 北 but not the actual character, how to solve that? For your information, the data is saved as "北" in database. Your help is appreciated here. Thanks
<?php
$db_domain = "127.0.0.1";
$db_user = "root";
$db_pwd = "password";
$db_schema = "mydb";
$link = mysql_connect($db_domain, $db_user, $db_pwd) or die("Could not connect : " . mysql_error());
mysql_select_db($db_schema
$result = mysql_query('SET NAMES utf8;');
$select = "SELECT * FROM registration";
$header = "";
$data = "";
$export = mysql_query ( $select ) or die ( "Sql error : " . mysql_error( ) );
$fields = mysql_num_fields ( $export );
for ( $i = 0; $i < $fields; $i++ ) {
$header .= mysql_field_name( $export , $i ) . "\t";
}
while( $row = mysql_fetch_row( $export ) ) {
$line = '';
foreach( $row as $value ) {
if ( ( !isset( $value ) ) || ( $value == "" ) ) {
$value = "\t";
} else {
$value = str_replace( '"' , '""' , $value );
$value = '"' . $value . '"' . "\t";
}
$line .= $value;
}
$data .= trim( $line ) . "\n";
}
$data = str_replace( "\r" , "" , $data );
if ( $data == "" ) {
$data = "\n(0) Records Found!\n";
}
header("Content-type:appli
header("Content-Dispositio
header("Pragma: no-cache");
header("Expires: 0");
echo "$header\n$data";
exit();
?>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Sorry for late come back here.. but I can't make it to work, i got this error message returned:
Warning: cannot yet handle MBCS in html_entity_decode()! in /home/sitefolder/domains/m
test.php:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; Charset=UTF-8">
</head>
<body>
<?php echo html_entity_decode("ࡏ
</body>
</html>
can advise?
The message means just what it says -- your PHP's html_entity_decode can't handle multi-byte character sets. Your options are:
1: Upgrade PHP
2: Use another format where you can directly output the encoded entities (such as HTML or XML)
3: Write a function to convert the entities.
I guess 1 and 2 are very likely not good solutions for you, so for the third option, take a look at this:
http://fi2.php.net/manual/
That comment contains a set of functions that seem to work quite nicely (I tried out some of the more concise functions, but none of them seemed to work for the character 北)
Business Accounts
Answer for Membership
by: adrian_brooksPosted on 2006-08-28 at 22:29:36ID: 17409332
First of all, what character is that possibly even supposed to be?
I can't even look anything like that up.