Hello guys,
i've the following table in database :

IdCity int
CityName nvarchar(20)

it has the data like this in it :

IdCity CityName
1 Абакан
2 Азов
3 Александров
4 Алексин
5 Альметьевск
6 Анапа
when i try to run the following view

    SELECT       IdCity, CityName
    FROM            dbo.City
    WHERE        (CityName = 'Абакан')

i get the results null, althought that record in the table
i tried to add a record with cityname= 'abc' and ran the view with this parameter, it worked fine
so it only doesn't get results written in russian
any ideas?

SQL query problem with any language except English

Hi Mohamedrani

Assuming you are using MYSQL with unicode support, you need to set the charset after connecting to the database:

mysql_query("SET NAMES UTF8");

You may have to tell the browser that you are sending out UTF-8 chars as well?

Hope this helps

commented: thanks for your comment , but a question , where should i put that line? +1

Just after your mysql_connect()

commented: i'm not using any UI or frontend , i'm working on SQL server itself +0

zzz.png

This post has no text-based content.

So I also use MySQL and not SQL Server, but I know with MySQL I have to specify the character set for individual table columns as well as the character set for my connection.

Andre had the right idea in that you want to be using the UTF-8 character set. I’m just not sure where in the SQL Server software you can configure that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.