foreign character encoding

H

Harley

im working on an ASP.NET app in VB.NET and have problems with foreign
characters.
everything works ok, special characters are presented ok onscreen when typed
in the body of the page, using html encoding or not, i.e.

&aacute and á both display an a with an acute symbol

the problem come when is pass foreign characters using parameters and get
the using Server.Params or Request.QueryString, they simply disappear.

a call test.aspx?param=áaée

should show the param string as áaée, but it only shows it as ae.

both pages are using utf-8 charset, but i also tryied without it, and didnt
work either...

also tryied to encode the querystring using Server.HtmlEncode(string) and
Server.URLEncode(string) before passing it, but nothing...

my system is configured as any regular us machine, english os, english
explorer, etc. nothing special there... any hint?
 
S

Steve C. Orr, MCSD

Have you tried setting it to use unicode?
Here's more info on the subject:
http://msdn.microsoft.com/library/d...en-us/cpguide/html/cpconencodingbasetypes.asp

Also, have you checked the Globalization section of the web.config?
Try changing it to something more like this:

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
<globalization
fileEncoding="iso-8859-1"
requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1"
/>

</system.web>

</configuration>
 
H

Harley

the web.config settings did it.
thank you!

Steve C. Orr said:
Have you tried setting it to use unicode?
Here's more info on the subject:
http://msdn.microsoft.com/library/d...en-us/cpguide/html/cpconencodingbasetypes.asp

Also, have you checked the Globalization section of the web.config?
Try changing it to something more like this:

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
<globalization
fileEncoding="iso-8859-1"
requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1"
/>

</system.web>

</configuration>
 

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

Top