Click here to Skip to main content
15,906,106 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Dear All,

am working on Asp.net Gridview C#

on my webpage i have Gridview to edit and delete the records.

after editing the record it shows ???????????? for arabic column.

Please can you help me.

Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 7-Oct-13 2:47am    
Okay, you screwed up something. How can we know what?
Make sure you never use anything non-Unicode in between.
—SA
Ubaid ur Rahman IT 7-Oct-13 2:59am    
Please can you help, i dont know what to do exactly.

This is a usual behavior when you try to convert Unicode data into something in non-Unicode encoding. You need to make sure that encodings other then UTFs are never used. As you did not provide more information to give you more detailed advice, that's all.

—SA
 
Share this answer
 
Comments
Ubaid ur Rahman IT 7-Oct-13 2:59am    
Please can you give me the solution for this.
Sergey Alexandrovich Kryukov 7-Oct-13 4:17am    
For what?! I did not see a line of your code, have no idea what did you try and where did you screw up. Due to long today's rain, my access to your hard drive is somewhat limited...
—SA
You should use NVARCHAR for storing Arabic data instead of VARCHAR
 
Share this answer
 
You have to make sure that the content encoding for your web pages is UTF, otherwise it is not going to work. Here are few tips:
1. Make sure the datatype of your data in database table is nvarchar.
2. Make sure that the SP you are using also has nvarchar as parameter type.
3. Make request and response encoding as UTF-8. Add this in the web.config for application level encoding:

HTML
<configuration>
  <system.web>
    <globalization
      requestEncoding="utf-8"
      responseEncoding="utf-8"      
    />
  </system.web>
</configuration>

and add this for page level encoding:
ASP.NET
<%@ Page RequestEncoding="utf-8" ResponseEncoding="utf-8" %>

And as SA said we don't know what did you screw, this probably is just few suggestions that might work. Try and come back if it helps.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900