Re: [PHP-DB] character problem with mssql
If problem is in your database use htmlentities(). It while translate all characters to HTML entities (check PHP manual). Else you should check web page's character code. Nikos > Hi; > > I use php and mssql. I have got a character problem. I must use turkish > chracters. When I select datas from database it works true and I can see > turkish characters but when I want to insert new datas to database it set > wrong character. > > For example "ÞÝ" characetrs look like "?" How can I solve this problem? My > data type is char 100. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] character problem with mssql
Hi, the problem is you use a different codepage for all those characters. If you use a char(100) in MSSQL it will be single byte and connected to a codepage used by this database. You than can only use chars that reside in this code page. This is true for MySQL as well. MSSQL has the nChar(100) column type wich is multibyte (Unicode utf-8 i believe). If you have some thing that submits a mulitbyte string to the database it should work. AFAIK you have to compile PHP with multibyte support and this might work. I normally use the method of avoiding those chars by converting them to ї translation so a browser can understand them even with a wrong codepage set. Formdata is normally converted by the browser regarding to the set codepage and it should submit those ї strings that you can enter in a database with no multibyte support. Best regards, Karsten Eichentopf -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] character problem with mssql
opps! i didn't read your question properly! i'm so so sorry.. i have not used mssql before, so many someone out there would be a better help to you.. by the way, your english is okay! i can understand it.. but i'm afraid i can't be much of a help to you =( - Original Message - From: "Gamze Başaran" <[EMAIL PROTECTED]> To: "Ng Hwee Hwee" <[EMAIL PROTECTED]> Sent: Thursday, December 04, 2003 3:17 PM Subject: RE: [PHP-DB] character problem with mssql > Hi; > First of all thanks for your concern. No I'm not use an turkish application. > I write a program with php,phplib and my database must be mssql. Our > webserver is linux. (Debian) When I connect to mssql and insert a data I > haven't got any turkish chracter problem. I select them in my program and > they seen normal. But when I want to add a record from my program with an > insert centence it isn't add do database true. My turkish characetrs go to > bad like ???. I look my sql centence with echo it likes > > INSERT INTO (Banks Bank-name, Used_limit) values ('İŞ BANKASI',123456); > > But in the database it add like '?? BANKASI' > > I hope I can explain my problem with my bad english :)) > > > > -Original Message- > From: Ng Hwee Hwee [mailto:[EMAIL PROTECTED] > Sent: 04 Aralık 2003 Perşembe 03:22 > To: Gamze Başaran; [EMAIL PROTECTED] > Subject: Re: [PHP-DB] character problem with mssql > > > hi, > > i had the same problem a while ago with japanese characters. are you using a > turkish OS or turkish application to insert your data? > > for me, what happened was i was given a file from a colleague who was using > japanese OS and japanese version of excel. when he passed me the data, i > opened it in Win2000 english version and edited the data with Excel2000 > english version. when i save the file in a .csv format, i think the japanese > characters got corrupted cos when i uploaded the file to PHPMyAdmin, i get > ?? instead of my jap characters. but when my colleague tried on his > machine with all the japanese settings, it worked well and good.. once the > data is inside, any one can read it with the characters .. reading has never > been a prob.. > > to what i experienced, the OS and the application may solve your prob. > > hth > hwee > > > - Original Message - > From: "Gamze Başaran" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, December 03, 2003 9:38 PM > Subject: [PHP-DB] character problem with mssql > > > > Hi; > > > > I use php and mssql. I have got a character problem. I must use turkish > > chracters. When I select datas from database it works true and I can see > > turkish characters but when I want to insert new datas to database it set > > wrong character. > > > > For example "Şİ" characetrs look like "?" How can I solve this problem? My > > data type is char 100. > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] character problem with mssql
hi, i had the same problem a while ago with japanese characters. are you using a turkish OS or turkish application to insert your data? for me, what happened was i was given a file from a colleague who was using japanese OS and japanese version of excel. when he passed me the data, i opened it in Win2000 english version and edited the data with Excel2000 english version. when i save the file in a .csv format, i think the japanese characters got corrupted cos when i uploaded the file to PHPMyAdmin, i get ?? instead of my jap characters. but when my colleague tried on his machine with all the japanese settings, it worked well and good.. once the data is inside, any one can read it with the characters .. reading has never been a prob.. to what i experienced, the OS and the application may solve your prob. hth hwee - Original Message - From: "Gamze Başaran" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 03, 2003 9:38 PM Subject: [PHP-DB] character problem with mssql > Hi; > > I use php and mssql. I have got a character problem. I must use turkish > chracters. When I select datas from database it works true and I can see > turkish characters but when I want to insert new datas to database it set > wrong character. > > For example "Şİ" characetrs look like "?" How can I solve this problem? My > data type is char 100. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] character problem with mssql
Hi; I use php and mssql. I have got a character problem. I must use turkish chracters. When I select datas from database it works true and I can see turkish characters but when I want to insert new datas to database it set wrong character. For example "Şİ" characetrs look like "?" How can I solve this problem? My data type is char 100. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php