all groups > asp.net > july 2003 >
You're in the

asp.net

group:

foreign character encoding


foreign character encoding Harley
7/25/2003 10:35:35 PM
asp.net:
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?

Re: foreign character encoding Steve C. Orr, MCSD
7/25/2003 11:18:07 PM
Have you tried setting it to use unicode?
Here's more info on the subject:
http://msdn.microsoft.com/library/default.asp?url=/library/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>

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net


[quoted text, click to view]

Re: foreign character encoding Harley
7/26/2003 2:26:22 PM
the web.config settings did it.
thank you!

[quoted text, click to view]

AddThis Social Bookmark Button