Page 1 of 1

utf8/unicode

Posted: Thu May 22, 2003 7:16 am
by vinod
I am using IIS 5.0 /Win 2000/PHP/SQL Server 2000

My First HTML Page is as
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<head>
<title></title>
</head>

<body>

<form id="FORM1" name="FORM1" action="test2.php" method="post">
<p> </p>
<p><input id="text2" name="text1" size="20"></p>
<p><input id="text1" name="text2" size="20" style="font-family: Mangal"></p>
<p><input id="text3" name="text3" size="20" style="font-family: Mangal"></p>
<p><input id="submit1" type="submit" value="Submit" name="submit1"></p>
</form>

<p> </p>
</body>
</html>

My test2.php is as

<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</HEAD>

<?php
$dbdsn="test";
$username="test";
$password="test";
$conn=odbc_connect($dbdsn,$username,$password);


$seldata ="insert into table1 values(" . $_POST['text1'] . ",N'" . $_POST['text2'] . "',N'" . $_POST['text3'] . "')";

$res=odbc_do($conn,$seldata);


?>
</html>

Now Table1 structure is
Emp_no Numberic
emp_name nvarchar
emp_add nvarchar

if I store Unicode/UTF 8 data for ex. तकगद
& if I open Table I got following codes like
& # & some number 2340;


Is this Unicode? or ?

Pl. guide me

Posted: Fri Jun 06, 2003 11:22 am
by rebyphp
न is called the "decimal numeric character reference". It is used in the 2000 or XP (other platform too) when data is exchanged. This is unicode that backward compatable with ASCII...

For more info. Please go to:

UTF-8 UTF8 - What is it and why is it important?

http://www.sun.com/developers/gadc/tech ... /utf8.html