Page Encoding Problem?

G

Guest

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?
 
S

Steven Cheng[MSFT]

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/library/c6zyy3s9(VS.80).aspx

and for your scenario, you can have a look at the encoding related
settings. ASP.NET support several encoding setting(requestEncoding,
responseEncoding, 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/library/39d1w2xf(VS.80).aspx

RequestEncoding is used to control how to ASP.NET runtime process the text
passed from client, while responseEncoding 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.)
 
S

Steven Cheng[MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top