1

First of all take a look at website www.elcieloessalud.com/Tratamientos.aspx

I have built this website for a spanish client of mine, it is built in .net framework 3.5
issue is that i have a cms kind of page that allows me to change text of the pages etc.
when changed, text appears perfect in rich text box but page appears messed up. as you can see in the above page lots of aquí,Salvación ,Dios…†etc..
although it should be something like aquí,Salvación,Dios…”

Any help in this help would be appreciated!

Regards,

Umair

Adnan
  • 25,882
  • 18
  • 81
  • 110

2 Answers2

1

Include this on your html header part

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

If you page is not on utf-8, then I suggest to render it on utf-8, or find your charset for your Language and set it. The charset must be the same as your file to have correct render. In the visual studio you can see your char set of your file on the menu: File | Advanced Save Options... In some friends of me this menu is not exist, you can add it on the Tools | Customize. (for more details for how to add it search on internet - there are a lot of info.)

Also you can try to set on web-config (or set your language)

<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
Aristos
  • 66,005
  • 16
  • 114
  • 150
  • thanks for the reply! I have tried setting meta on page as well as charset thing.. but it didn't help.. just for your info the charset of my website is Western European(Widnwos) - Codepage 1252 i have changed it to UTF-8 but still of no use.. – Muhammad Umair Apr 26 '11 at 03:55
  • @muhammad I have update my answer, try also the globalization – Aristos Apr 26 '11 at 11:42
0

Finally i did it :) with help of @Aristos as well!

we need to include

meta http-equiv="Content-Type" content="text/html; charset=utf-8"

in all the pages including masterpage and change charset of language to whatever yours is and when creating the streamwriter to write we need to indicate the encoding there as well as below
Dim sw As StreamWriter
sw = New StreamWriter(FileName, False, Encoding.UTF8)



and you are done !! :) happy coding