Bug or something going wrong in ASP.net Framework???

  • Thread starter Thread starter Miguel Dias Moura
  • Start date Start date
M

Miguel Dias Moura

Hello,

i am a portuguese web designer and i am changing an ASP to ASP.net web site.
This web site uses Access Database where i created 10 Tables.

Each table has some fields and some of the data include portuguese
characters such as "ç", "é", "á" and others like "?".

I found 2 problems:
1. In one page i was displaying some data from a Table which included
products prices from a table text field named "Price".
The first 5 items are: "?100", "?300", "?200", "?220", "?120",
The prices showed up in the web page but not the symbol "?" which was
changed to another strange symbol.

2. In one page i have a < runat="server"> Form with 2 DropDownMenus and a
button.
The 2 DropDownMenus are populated using a Table in the database.
When i click the button the user is redirected to a new page and the
DropMenuValues values are sent in the URL.
Well, i tested when the DropDownMenu values where "Françês" and "2003".
When i clicked the button the URL showed:
http://localhost/mywebsite/list.aspx?Theme=Francs&Year=2003

Can you see how "Françês" was changed to "Francs" so the "ç" was changed
to "c" and "ê" disapeared.

Well, such kind of problems are happening and when i had the web site in ASP
everything was fine.
This situations only came up when i installed ASP.net Framework and started
to convert this web site to ASP.net.

Can you tell me what is going wrong? Is this a .net Framework problem?

Thank You,
Miguel
 
Hi,

I'm also familiar with this behavior but from Hebrew point of view ;-) .
Anyway it's due to the fact that the default web encoding is UTF-8,
wasn't in ASP. Your problem is happened because your access database
returns ASCII and not Unicode characters. You can:
1) set Access to return Unicode (sorry I'm not familiar with access)
2) Change the default web encoding in web.config :
<globalization
requestEncoding="utf-8" --> change here.
responseEncoding="utf-8" --> change here.
/>

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
Hi,

do u know how can i find the right enconding for european characters? Is
there maybe a lits somewhere?

Thanks,
Miguel
 
Hello,

can u send me a web.config file with it so i can see how you implement it.
Some how i am getting an error.

Thank You,
Miguel
 
I just made it work but with the UTF-8 encoder.
When i change that code i just get an error.

Can you tell me what codes you have been using to check it out?

Thanks,
Miguel
 
Back
Top