Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


Closed Thread
  Search this Thread
Old 11-17-2011, 09:52 PM   #1
Registered: Mar 2010
Location: Turkey
Posts: 35

Rep: Reputation: 0
Turkish Character Issue in PHP and MS-SQL

Hi There;
As a hot volunteer of an open source initiative, I feel sorrow using MS-SQL and IIS. I could not convince boss to use mySQL, but anyway I can push PHP on boss.

I have a MS-SQL server and I have Turkish names in my table. User enters names and I send it to SQL server, print result to output. However, my PHP code process and prints text as a UTF-8,and send it to MS-SQL and print it to output.However data in MS-SQL is in Windows(Turkish) format, so there are nothing to return. For example;
when user types "Güray" in html input form, PHP issues a query:
"SELECT * FROM table WHERE name ='Güray' " and sends it to MS-SQL server. Server returns nothing, but I know that there are many entries that name attribute is 'Güray'.
But when name contains purely English characters, such as 'Ali' it works fine.

In addition, when I print result of query returned by MS-SQL via HTML , Turkish character in a string printed in a rectangle.

How can I overcome these two frustrating situations? Any help is greatly appreciated.

(The message is mistakenly doubled. Please do not take into account that message, reply to the message above.)

Last edited by gozlemci; 11-17-2011 at 10:02 PM.
Old 11-18-2011, 10:31 PM   #2
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Follow thread here:

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL substring matching a character ShaqDiesel Programming 2 04-07-2011 03:53 PM
PHP and ms-SQL joelhop Programming 2 11-22-2006 09:45 AM
mount -t smbfs -o // turkish character problem fahridon Linux - Networking 1 05-23-2006 06:33 AM
Php, Sql kotoisin Fedora 3 11-30-2004 06:18 PM
php/SQL shaggystyle Linux - General 1 12-23-2003 10:29 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration