Hi I'm have big problems trying to save Unicode information into my MS SQL Server 2000 Desktop Engine.
Alright, so the problem I'm having now is I'm working with MS SQL 7.0 and PHP5. I've trying to get information to save into MS SQL, however it is storing it all weird. When I save the information and try to view it in Enterprise Manager it shows it has random characters but for some weird reason I can output that information on the page correctly when I do a SELECT query.
Here's an example of my problems.
But to make everything that little bit more weird, when I output it it shows correctly.
Now here's the kicker. When I do the same INSERT with SQL Query Analyzer, it puts in it the DB correctly. AND when I look at using Enterprise Manager it shows "主要提供韓式菜餚的" and "主要提供素食餐點或提供素菜菜餚的餐廳".
Alright, so does any know how I can get PHP to be able to insert proper Unicode information into my MS SQL 7.0 DB?
Alright, so the problem I'm having now is I'm working with MS SQL 7.0 and PHP5. I've trying to get information to save into MS SQL, however it is storing it all weird. When I save the information and try to view it in Enterprise Manager it shows it has random characters but for some weird reason I can output that information on the page correctly when I do a SELECT query.
Here's an example of my problems.
<?php
$insQ = "INSERT INTO my_tblBusiness (
pkID,
fkbusinessID,
ntitle,
ndescr
) VALUES (
'1',
'1',
N'主要提供韓式菜餚的',
N'主要提供素食餐點或提供素菜菜餚的餐廳'
)";
$DB->Query($insQ);
/**
* When I look at this information using Enterprize Manager
* it is showing
* Title: "ä¸»è¦æä¾›éŸ“å¼èœé¤šçš„é¤å»³"
* Descr: "ä¸»è¦æä¾›ç´ é£Ÿé¤é»žæˆ–æä¾›ç´ èœèœé¤šçš„é¤å»³ï¼Ž"
*/
?>
But to make everything that little bit more weird, when I output it it shows correctly.
<?php
$DB->Query("SELECT
ntitle,
ndescr
FROM my_tblBusiness");
while($rs = $DB->fetch_assoc()){
echo 'Title:'.$rs['ntitle'].'<br />';
echo 'Descr:'.$rs['ndescr'];
}
/**
* Outputs in the Browser:
* Title: 主要提供韓式菜餚的
* Descr: 主要提供素食餐點或提供素菜菜餚的餐廳
*/
?>
Now here's the kicker. When I do the same INSERT with SQL Query Analyzer, it puts in it the DB correctly. AND when I look at using Enterprise Manager it shows "主要提供韓式菜餚的" and "主要提供素食餐點或提供素菜菜餚的餐廳".
Alright, so does any know how I can get PHP to be able to insert proper Unicode information into my MS SQL 7.0 DB?