Answered by:
?????? Encoding problem

Question
-
User1129923593 posted
Salam To All,
i have two labels A,B.
i save some information in the database, thos information wrote in a language different than "English" .... its "Arabic".
i bind some information from the database to that labels.
label A shows the information correctly.
but label B replace the original data with a question marks "?????" !!!
i ensured that the informatoin was inserted to database correctly with as my correct incoding.
also, i write the following lines in my web config to apply UTF8 Encoding on my site at all:
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US" uiCulture="de-DE" />
do i miss any thing ?
Friday, April 30, 2010 5:34 PM
Answers
-
User1129923593 posted
after many tracing,
i found that the question mark Label Data comming from a class function, but the other Labels bounded directly in UI.
does that affect ?
do you have any suggestions to encode class to UTF8 ?
i know that way, in class file, i go to File ---> Save As Options ----> and i choose with UTF8.
is there another way to Encode returned back string in UTF8 ?
please response.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 6:04 PM -
User1129923593 posted
i found and fix the problem,
the problem is when i insert some data in my database, i used SqlCommand but with out InsertParameters, in my PC "because i install a correct encoding" the data inserted correctly, but when i upload the files on my server, the server didnot install my language encoding, so the data inserted as |?????" in my database server, because of not having the permission to install multilanguage encoding, when i used sqlparamter in my Insert command query, the data inserted as a correct encoding even the encoding is not installed to my server.
i hope that will help any body face the same problem.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, May 3, 2010 8:24 PM
All replies
-
User-1200560727 posted
Your database type should nVarchar or nText.
Saturday, May 1, 2010 1:56 PM -
User1129923593 posted
thank you,
yes sure, my database column type is nVarchar.
also i checked the field directly from the database and it displayed as it seemed to be not question marks."??????"
the problem is not from the database.
i put the previous code in dotent to ensure a correct encoding,
do you have any suggestions ?
Saturday, May 1, 2010 2:54 PM -
User1129923593 posted
after many tracing,
i found that the question mark Label Data comming from a class function, but the other Labels bounded directly in UI.
does that affect ?
do you have any suggestions to encode class to UTF8 ?
i know that way, in class file, i go to File ---> Save As Options ----> and i choose with UTF8.
is there another way to Encode returned back string in UTF8 ?
please response.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 6:04 PM -
User1129923593 posted
i found and fix the problem,
the problem is when i insert some data in my database, i used SqlCommand but with out InsertParameters, in my PC "because i install a correct encoding" the data inserted correctly, but when i upload the files on my server, the server didnot install my language encoding, so the data inserted as |?????" in my database server, because of not having the permission to install multilanguage encoding, when i used sqlparamter in my Insert command query, the data inserted as a correct encoding even the encoding is not installed to my server.
i hope that will help any body face the same problem.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, May 3, 2010 8:24 PM