2

Ascii 解码错误

文字 ="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."

我将文本保存到 MYSQL 表中的 novarchar 列中,它插入成功。

当我在控制台中检索此数据时,它显示正确。但是当我试图通过 django 检索它并在模板中显示它时,它显示为一些 ascii 字符。

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

4

1 回答 1

0

我猜你错过了模板中的内容类型元标记:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
于 2012-07-26T17:43:05.433 回答