2

Ascii decoding error

Text = "Hanuman (Sanskrit: हनुमान्, Hanumān), a Hindu deity who was an ardent devotee of Rama according to Hindus legends, and a central character in the Indian epic Ramayana."

I saved the text into MYSQL table to novarchar column, it inserts successfully.

when i retrieve this data in console, it is displaying correctly. But when i tried to retrieve it via django and display it in template ,it is showing as some ascii characters.

Displaying as "Hanuman (Sanskrit: हनà¥à¤®à¤¾à¤¨à¥, HanumÄn), is a Hindu deity who is an ardent devotee of Rama, a central character in the Indian epic Ramayana."

danielrvt
  • 10,177
  • 20
  • 80
  • 121
tom joy
  • 411
  • 8
  • 22
  • 2
    Please show some code. What does the model look like? How are you getting the data? How are you displaying it in the template? How did you insert it in the first place? – Daniel Roseman Jul 09 '12 at 09:57
  • 1
    https://docs.djangoproject.com/en/dev/ref/unicode/ Please take a look – Quicksilver Jul 09 '12 at 10:01

1 Answers1

0

I guess you miss the content type meta tag in your template:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Aidas Bendoraitis
  • 3,965
  • 1
  • 30
  • 45