Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hai

Actually i am facing problem in displaying text in asp.net grid view . in my data base i had text like below

"
hai this is nitish 👍🏼
"

the above text entered into database is through mobile app

when i am binding the text in web application i am facing the below error

Unable to translate Unicode character \uD83C at index 79 to specified code page.


is there any solution to solve this issue
Posted
Comments
Sergey Alexandrovich Kryukov 13-May-15 0:55am    
Please show essential part of your code and HTTP-EQUIV of the page, if any. What is your code page and how do you specify it (if you do)?
—SA

1 solution

Short answer is: use Unicode UTF, preferably UTF-8. You did not explain how exactly did you screw up things; please see my comment to the question.

Don't leave anything to defaults (say, browser defaults). In each file, explicitly speciagefy Content-Type with charset. Your head element needs to include something like
HTML
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


Why it should be not just HTTP header, but HTML http-equiv? By many good reasons. One important reason is this: of the user saves the page into a local file, HTTP headers won't be preserved.

Of course, actual content encoding should match it. :-)

—SA
 
Share this answer
 

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