473,396 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem displaying special characters

Hi,

I've got a problem with displaying texts with turkish characters.

There is a website administration system, which is developed using ASP
(VBScript) and ADO. This system is being used for inserting product
informations in to a ms-sql database.

There is another webbased application, which is developed using ASP.NET and
ADO.NET (C#). For this second application there is a separate ms-sql
database but the data on the first database is also being accessed and
displayed and that is exactly where my problem occures. The data, which was
written in to the database by the first application (ADO) can not be read by
the second application (ado.net) properly. Some of the turkish characters
are displayed as questionsmarks etc. The field at the database is NVARCHAR
(unicode).

Is there a way setting the encoding for a dataadapter before calling the
fill method? Or is there another workarround for this problem? Thanks in
advance.

Kivanc Toker
TUM Group IT Soluotions

Nov 19 '05 #1
4 3460
Does it mean that whatever the DataAdapter fills contains incorrect
characters or are they just displayed wrongly afterwards?
Best regards,

Henrik Dahl

"Kivanc Toker" <kt****@flashmail.com_NOSPAM> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
Hi,

I've got a problem with displaying texts with turkish characters.

There is a website administration system, which is developed using ASP
(VBScript) and ADO. This system is being used for inserting product
informations in to a ms-sql database.

There is another webbased application, which is developed using ASP.NET and ADO.NET (C#). For this second application there is a separate ms-sql
database but the data on the first database is also being accessed and
displayed and that is exactly where my problem occures. The data, which was written in to the database by the first application (ADO) can not be read by the second application (ado.net) properly. Some of the turkish characters
are displayed as questionsmarks etc. The field at the database is NVARCHAR
(unicode).

Is there a way setting the encoding for a dataadapter before calling the
fill method? Or is there another workarround for this problem? Thanks in
advance.

Kivanc Toker
TUM Group IT Soluotions

Nov 19 '05 #2
Hi,

"Henrik Dahl" <He********@community.nospam> wrote in message
news:u%****************@TK2MSFTNGP09.phx.gbl...
Does it mean that whatever the DataAdapter fills contains incorrect
characters or are they just displayed wrongly afterwards?


When I make a simple search query in VS.NET, the information returned
contains invalid chars, which means the data inserted by ADO seems somehow
incorrect. But I can not say it for sure, because there is no turkish ms-sql
server version, which displays the texts correctly as we use them in our
language. But the first application (asp-ado-mssql server) displays the same
data correctly.

I know, what you think with "or are they just displayed wrongly afterwards".
I also use the required request, response and file encodings in web.config,
which is like:

<globalization

requestEncoding="ISO-8859-9"

responseEncoding="ISO-8859-9"

fileEncoding="ISO-8859-9"

culture="tr-TR"

uiCulture="tr-TR"

/>

Still need help...

Thank you..

Kivanc Toker

TUM Group IT Solutions
Nov 19 '05 #3
Got new informations about the problem.

http://forums.asp.net/518209/ShowPost.aspx

The most interesting part is :

"CAUSE:
The reason I found out was that each gb2312 character I store in MSSQL 2000,
it convert to unicode, splitting the double-byte characters into single
bytes, then converting each single-byte based on the codepage in
windows-1252 to the corresponding unicode equivalent.
Legacy ASP works, because everything is converted back from unicode back
into single-byte "char" (vs double-byte "char" in ASP.net), and all we have
to do is to set the response.charset=gb2312 to get it to work.
However in ASP.net, the WebForm does conversion base on the webform codepage
and webform charset, including the web.config globalization
responseEncoding, requestEncoding and fileEncoding. Hence you have to
manually set the webform codepage to windows-1252, but webform charset has
to be set to gb2312. During page_load, you have to type in
"response.charset=nothing" to display the data from MSSQL with no problem.
"

The problem is I didn't get the solution. I have the same problem with
turkish characters and I still need help.

Thanks in advance..

Kivanc Toker
Nov 19 '05 #4
What if you set the encoding to "UTF-8" instead of "ISO-8859-9"?

Best regards,

Henrik Dahl

"Kivanc Toker" <kt****@flashmail.com_NOSPAM> wrote in message
news:eK***************@TK2MSFTNGP15.phx.gbl...
Hi,

"Henrik Dahl" <He********@community.nospam> wrote in message
news:u%****************@TK2MSFTNGP09.phx.gbl...
Does it mean that whatever the DataAdapter fills contains incorrect
characters or are they just displayed wrongly afterwards?
When I make a simple search query in VS.NET, the information returned
contains invalid chars, which means the data inserted by ADO seems somehow
incorrect. But I can not say it for sure, because there is no turkish

ms-sql server version, which displays the texts correctly as we use them in our
language. But the first application (asp-ado-mssql server) displays the same data correctly.

I know, what you think with "or are they just displayed wrongly afterwards". I also use the required request, response and file encodings in web.config, which is like:

<globalization

requestEncoding="ISO-8859-9"

responseEncoding="ISO-8859-9"

fileEncoding="ISO-8859-9"

culture="tr-TR"

uiCulture="tr-TR"

/>

Still need help...

Thank you..

Kivanc Toker

TUM Group IT Solutions

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Mosher | last post by:
Hi all, I have an issue with php and/or mysql. I have a php form that writes "items" to a mysql database, including a description of the item. On the mysql server, "magic_quotes_gpc" is ON. I...
2
by: John Smith | last post by:
I have a table that contains a chunk of text, and the text commonly has special characters, such as "&amp;" or "–". To edit this text, there is a page where the text is dumped into a textarea....
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
2
by: David Scemama | last post by:
Hi, I'm looking for a way to display semi graphic characters in a multi line text control or in a rich text control. I've tried with all the characters of the extended ASCII table (code page...
5
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
7
by: jitu78 | last post by:
Hi, I am displaying dynamic content in my flash. Dynamic data is coming from XML and in flash file, html entities are not showing right, strange characters are displaying there. Here is link,...
2
by: chike_oji | last post by:
Hello, I am displaying data retrieved from a database as a httpresponse in a webform. I noticed that some characters such as the comma (,), display as special characters in the web browser...
3
by: rhandoo | last post by:
Hi, I am facing the problem in displaying the special characters like ( ` ) GRAVE ACCENT in C# windows Application. I am using oracle as back end. In oracle database table the string contain...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.