473,769 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3488
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****@flashma il.com_NOSPAM> wrote in message
news:eG******** ******@TK2MSFTN GP10.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********@com munity.nospam> wrote in message
news:u%******** ********@TK2MSF TNGP09.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:

<globalizatio n

requestEncoding ="ISO-8859-9"

responseEncodin g="ISO-8859-9"

fileEncoding="I SO-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.charse t=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
responseEncodin g, 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.chars et=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****@flashma il.com_NOSPAM> wrote in message
news:eK******** *******@TK2MSFT NGP15.phx.gbl.. .
Hi,

"Henrik Dahl" <He********@com munity.nospam> wrote in message
news:u%******** ********@TK2MSF TNGP09.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:

<globalizatio n

requestEncoding ="ISO-8859-9"

responseEncodin g="ISO-8859-9"

fileEncoding="I SO-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
28587
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 am testing it now by putting special characters in the description field, this is what I am entering: O'Leary "special edition"
2
2292
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. However, IE interprets the special characters, instead of their values. How can I have it so that when the text from the database is displayed inside a textbox, IE does not display the characters but instead their values? Thank you!
12
9645
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(" & Chr(34) & PopUpWindowTitle & Chr(34) & ", " & Chr(34) & CurrentEventDetails & ")" strTemp += "<BR><A HREF='#' onClick='" & PopupLink & "'>" & EventName & "</A><BR>" The problem I have is that when the string variables or contain a string with an...
2
3701
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 437), they appear correctly except the semi graphic ones. Please help ... Thanks a lot
5
8631
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". Same file path containing special characters works fine in one machine, but doesn't work in other. I am using following API function to get short file path. Declare Auto Function GetShortPathName Lib "kernel32" (ByVal lpszLongPath As
16
4928
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 Microsoft must be installed on their servers. Now german Umlaute (ä, ü, ö) and quotes are returned incorrectly in SOAP fault responses. This can be easily verified: Implement the following in a web service method (just raises a SOAPException with a...
7
6438
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, globtier.com/portfolio See featured work description at the bottom of the link above, if there is no special characters in description then refresh the page. You will see special character in description (like question mark and sometimes square...
2
2361
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 (Internet Explorer). It displays something like $^^% instead of a comma. Please how can I have the browser display the comma as it is from the database.
3
1768
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 the above character is stored as TONY ROBINSON`S CRIME AND PUNISHMENT in places in single code ( ‘ ) . Oracle database has following settings in nls_database_parameters
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.