Last post May 03, 2010 08:24 PM by iwadds
Apr 30, 2010 05:34 PM|iwadds|LINK
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:
do i miss any thing ?
May 01, 2010 01:56 PM|Tapan Bhatt|LINK
Your database type should nVarchar or nText.
May 01, 2010 02:54 PM|iwadds|LINK
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 ?
May 01, 2010 06:04 PM|iwadds|LINK
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 ?
May 03, 2010 08:24 PM|iwadds|LINK
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.