473,549 Members | 5,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net chinese encoding

Hello all,

I am having a few issues with encoding to chinese characters and
perhaps someone might be able to assist.

At the moment I am only able to see chinese characters when displayed
as part of a datagrid. When an input textbox is displayed it does not
display chinese characters, but rather the unicode characters stored
in the mssql 2000 server backend.

To get this setting to work I have the following web.config file
setting:
<globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8"
fileEncoding="u tf-8" culture="zh-CN"/>
and on page load I programatically set the following:
Response.Charse t = "gb2312";
these are the settings I use to get the above results.

I have tried setting the web.config to:
<globalizatio n requestEncoding ="gb2312" responseEncodin g="gb2312"
fileEncoding="g b2312" culture="zh-CN"/>
but this provides little help.

Additionally I have used some of the suggestions in the following post
http://www.asp.net/Forums/ShowPost.a...&PostID=518209
by overriding the TextBox Text property where in set I do the
following:
set
{
base.Text = ToSCUnicode(val ue);
}
which can display correct chinese characters on the initial page load,
however, when this page performs a post-back these chinese characters
are converted back to I assume unicode (could be wrong.)

I am hoping someone may have some experience/suggestions to lead me on
to the right track to solve this problem, any feedback would be
appreciated.

Thanks
Nov 18 '05 #1
0 981

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

Similar topics

8
3469
by: Agnes | last post by:
In my .net ,i need to generate an xml file , however, user may input a chinese character, Then , the xml will got something unknow characters. the following is my code, Does anyone know how to solve it ?? Private Sub Init() With AMSXML ..Formatting = Formatting.Indented ..Indentation = 4 ..IndentChar = " " ..WriteStartDocument()
0
724
by: Alex Chan | last post by:
Hi group, I am writing a RFC Server with SAP.NET Connector to connect to SAP. There are chinese characters passing back and forth. I found that all chinese characters sending from SAP are encoded with UTF-7. In order to let SAP display chinese characters correctly, i also need to encode my chinese data by UTF-7. However, i need to...
1
5723
by: Alex Chan | last post by:
Hi group, I am writing a RFC Server with SAP.NET Connector to connect to SAP. There are chinese characters passing back and forth. I found that all chinese characters sending from SAP are encoded with UTF-7. In order to let SAP display chinese characters correctly, i also need to encode my chinese data by UTF-7. However, i need to...
8
11939
by: pabv | last post by:
Hello all, I am having a few issues with encoding to chinese characters and perhaps someone might be able to assist. At the moment I am only able to see chinese characters when displayed as part of a datagrid. When an input textbox is displayed it does not display chinese characters, but rather the unicode characters stored in the mssql...
7
4285
by: c.verma | last post by:
I have a web application. There is a page which has a datagrid on it.The datagrid displays the data that comes from SAP. SAP sends the chinese characters to this grid. Before I display CHinese charactes, I have to use the following code to let it display on the web page: Public Function ToSCUnicode(ByVal str As String) As String Dim enc1252...
0
7526
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...
0
7455
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...
0
7723
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. ...
0
7962
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7480
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7814
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...
0
6050
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...
0
5092
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.