473,545 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page Encoding Problem?

I have created the world's simplest Code-Behind ASPX page in VS 2005. I've
used all the defaults. But when I go to build and run the page, it comes up
in Chinese (or some Asian character set). I've tried lots of stuff here and
nothing seems to be working. Any ideas?
Apr 9 '06 #1
2 2205
Hi Alex,

Welcome to the ASP.NET newsgroup.

From your description, you've created a very simple ASP.NET 2.0 page in VS
2005, when running the page, you found the page displayed the text in
chinese(asia) charset/encoding and you haven't been able to change it,
correct?

As for the charset/ecnoding problem, I'd like to confirm the detailed
behavior of it. Is the page displaying the text in some garbo code or it is
the client browser whch automatically choose chinese(aisa) encoding?

As for the ASP.NET's globalization/localization support, it can be divided
into serveral parts:

#ASP.NET Globalization and Localization
http://msdn2.microsoft.com/en-us/lib...s9(VS.80).aspx

and for your scenario, you can have a look at the encoding related
settings. ASP.NET support several encoding setting(request Encoding,
responseEncodin g, fileEncoding ) in web.config file (some can be set
dynamically in code or in page's @Page directive).

#How to: Select an Encoding for ASP.NET Web Page Globalization
http://msdn2.microsoft.com/en-us/lib...xf(VS.80).aspx

RequestEncoding is used to control how to ASP.NET runtime process the text
passed from client, while responseEncodin g controls who to runtime will
write out the string/text that will flushed to client-side. FileEncoding
is used to determine how to runtime will read text from the page's aspx
file.

In addition ,as for client browser, it will automatically select a encoding
type according to the server page's response encoding type, if you're sure
you've configured your ASP.NET page to output utf-8 encoded text, you can
manually select the browser's encoding to utf-8 to see whether the page can
display well.

If there's anything unclear or anything else I missed, please feel free to
let me know.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Apr 10 '06 #2
Hi Alex,

How are you doing on this issue, have you got any further progress or does
my last reply helps a little?
If there's still anything else we can help, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
Apr 14 '06 #3

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

Similar topics

1
3062
by: LP | last post by:
I need to figure encoding or code page of a file programmatically. Also I was asked to figure out what was the original encoding of different records stored as Unicode in SQL Server table. So, these records can be outputted to different files with original encodings. Can it be done? By the way, character encoding and code page are pretty...
7
2246
by: Brian Paul | last post by:
When a user clicks on a linkbutton on a page, i would like to render a printer-friendly version of the asp.net page and download it as an html attachment to the browser. The code below works great, with a few exceptions: 1) IE displays the FIle Download dialog box twice. (You have to click the Open button twice) 2) the encoding of the page...
2
4472
by: WEIWEIWEI | last post by:
Hi Al I'd like to encode a string submitted from a utf-8 form in a aspx page to big5 Any ideas on how to do that I try sth like public static string unicode_big5(string src) { Encoding big5 = Encoding.GetEncoding("big5") Encoding unicode = Encoding.UTF8 byte unicodeBytes = unicode.GetBytes(src)
3
2372
by: z f | last post by:
Hi, i run a web application in a commercial hosting. my web app need encoding of hebrew, but the default encoding on the hosting (win2003) is english - westren-european, and my pages are being read as western european encoding even if i add a content-encoding=windows-1255 which should work. the only solution i found is to save the pages as...
15
4722
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update button will verify the information that has been entered and updates the data base if the data is correct. Update will throw an exception if the data is...
8
8859
by: Ondrej Srubar | last post by:
Hello, in the Web.config I have <globalization requestEncoding="utf-8" responseEncoding="utf-8" />, but for one page I need to set the requestEncoding="windows-1250". If I use <%@Page RequestEncoding="windows-1250"%>, I get an error Atributte RequestEncoding is not supported by direktive page. What is the problem? Ondrej Srubar
17
1554
by: Luke Matuszewski | last post by:
Hi ! Simple question (but thus it may appear no simple answer): If i putting a script onto the page i simply could inline it in <script> element or via its src attribute so (second way): <script type="text/javascript" src="js/crossBrowserDegradationLib.js"> </script> , my question is simple What encoding should i use when writting my...
82
6224
by: Eric Lindsay | last post by:
I have been trying to get a better understanding of simple HTML, but I am finding conflicting information is very common. Not only that, even in what seemed elementary and without any possibility of getting wrong it seems I am on very shaky ground . For example, pretty much every book and web course on html that I have read tells me I must...
5
2804
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
We have a page that is loading very slow. There is not a lot of data, not a lot of users are connected at the same time and the page does not produce an error, so I am not sure where to start to look for why it is slowing down. I thought about the DB first and added NOLOCK to a couple of stored procedures that were being run, but with no...
0
7484
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
7675
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
7928
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
7440
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...
1
5344
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4963
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
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1902
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
0
726
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.