Answered by:
Characters displayed as question marks

Question
-
Hi
I face a problem with my asp.net web-form portal that is Characters displayed as question marks,when the user change the encoding characters in his browser and enter Arabic or Indian text into textboxes and submit the form I see the values as question marks in debugging and saved as question marks in DB.
I did the following but did not fix the problem
1 I saved all file (solution files) as utf-8.
2 added <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> in master page.
note:my portal connected to dynamics CRM online, CRM accept all languages and all encoding characters.
it is asp.net webform solution
Please help me.
- Edited by Suleiman90 Saturday, June 27, 2015 2:59 PM
- Moved by Caillen Sunday, July 5, 2015 6:00 AM
Saturday, June 27, 2015 1:16 PM
Answers
-
Question marks? Encoding issues:
Als note that ASP.Net question are better asked on this forum:
Saturday, June 27, 2015 3:11 PM
All replies
-
Use RichTextBoxes instead of TextBoxes.
jdweng
Saturday, June 27, 2015 2:08 PM -
I have asp.net webform solution
Saturday, June 27, 2015 2:58 PM -
Question marks? Encoding issues:
Als note that ASP.Net question are better asked on this forum:
Saturday, June 27, 2015 3:11 PM -
Apparently you need to use a 3rd party control. You are correct that asp.net doesn't have a richtextbox.
jdweng
Saturday, June 27, 2015 3:59 PM -
Check if you perhaps need a special <globalization> element in your Web.config file:
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
responseHeaderEncoding="utf-8"
enableClientBasedCulture="false"
enableBestFitResponseEncoding="false" />However this corresponds to default settings: https://msdn.microsoft.com/en-us/library/vstudio/hy4kkhe0%28v=vs.100%29.aspx.
What you mean by “the user change the encoding characters in his browser”. Usually the users only have to change the keyboard layout.
Have you reproduced the problem in a new simple WebForm local application with default settings?
Saturday, June 27, 2015 4:21 PM -
I tried globalization butt did not work.
any browser user can change the encoding for example in firefox go to view then character encoding then you can select any encoding type rather than Unicode.
Saturday, June 27, 2015 4:28 PM -
"1 I saved all file (solution files) as utf-8.
2 added <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> in master page."
Where in the master page did you put that Content-Type tag? Is it properly the first element inside the <head> tag?
Show us some HTML that showcases your problem. Browser can be very lenient in what they accept and interpret, often accepting glaringly missformed HTML.
Sunday, June 28, 2015 7:12 AM