1. <small id='atMFO'></small><noframes id='atMFO'>

  2. <legend id='atMFO'><style id='atMFO'><dir id='atMFO'><q id='atMFO'></q></dir></style></legend>
    <tfoot id='atMFO'></tfoot>

      • <bdo id='atMFO'></bdo><ul id='atMFO'></ul>
      <i id='atMFO'><tr id='atMFO'><dt id='atMFO'><q id='atMFO'><span id='atMFO'><b id='atMFO'><form id='atMFO'><ins id='atMFO'></ins><ul id='atMFO'></ul><sub id='atMFO'></sub></form><legend id='atMFO'></legend><bdo id='atMFO'><pre id='atMFO'><center id='atMFO'></center></pre></bdo></b><th id='atMFO'></th></span></q></dt></tr></i><div id='atMFO'><tfoot id='atMFO'></tfoot><dl id='atMFO'><fieldset id='atMFO'></fieldset></dl></div>

      Django mysql 阿拉伯语编码

      时间:2023-08-21

      <small id='V1EoY'></small><noframes id='V1EoY'>

        <tbody id='V1EoY'></tbody>
      <i id='V1EoY'><tr id='V1EoY'><dt id='V1EoY'><q id='V1EoY'><span id='V1EoY'><b id='V1EoY'><form id='V1EoY'><ins id='V1EoY'></ins><ul id='V1EoY'></ul><sub id='V1EoY'></sub></form><legend id='V1EoY'></legend><bdo id='V1EoY'><pre id='V1EoY'><center id='V1EoY'></center></pre></bdo></b><th id='V1EoY'></th></span></q></dt></tr></i><div id='V1EoY'><tfoot id='V1EoY'></tfoot><dl id='V1EoY'><fieldset id='V1EoY'></fieldset></dl></div>

        1. <tfoot id='V1EoY'></tfoot>
            <bdo id='V1EoY'></bdo><ul id='V1EoY'></ul>
              • <legend id='V1EoY'><style id='V1EoY'><dir id='V1EoY'><q id='V1EoY'></q></dir></style></legend>
                本文介绍了Django mysql 阿拉伯语编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我有一个带有 mysql 数据库的 django 应用程序.我们正在尝试推出该网站的阿拉伯语版本.目前的语言是英语.出于某种原因,当我通过管理面板用阿拉伯语写一些东西并单击保存时,它显示 ????而不是我写的阿拉伯语单词.我不知道如何解决它.

                I've a django app with a mysql database. We are trying to launch the Arabic version of the website. The current language is English. For some reason when I write something in Arabic through the admin panel and click save, it shows ???? instead of the Arabic word i wrote. I've no idea how to fix it.

                我按照这个 post 并添加了 #-*- coding: utf-8 -*- 到我的 admin.py、models.py 和 views.py 文件.没用

                I followed this post and added #-*- coding: utf-8 -*- to my admin.py, models.py and views.py files. It didn't work

                我还将这些添加到 my.conf mysql 文件中以更改字符集.它也没有用.

                I also added these to my.conf mysql file to change the character set. It didn't work either.

                character-set-server=utf8
                collation-server=utf8_unicode_ci
                init_connect='set collation_connection = utf8_unicode_ci;'
                

                推荐答案

                可能发生的事情:

                • 你有 utf8 编码的数据(好)
                • SET NAMES latin1 有效(默认,但错误)
                • 列被声明为CHARACTER SET latin1(默认,但错误)
                • you had utf8-encoded data (good)
                • SET NAMES latin1 was in effect (default, but wrong)
                • the column was declared CHARACTER SET latin1 (default, but wrong)

                请提供SHOW CREATE TABLE,以便我们可以制定ALTER来修复列.

                Please provide SHOW CREATE TABLE so we can formulate an ALTER to fix the columns.

                Django 需要 client_encoding: 'UTF8';抱歉,我不知道去哪里了.

                Django needs client_encoding: 'UTF8'; sorry, I don't know where that goes.

                这篇关于Django mysql 阿拉伯语编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:MySQL 中的阿拉伯语脚本错误 下一篇:MySQL 和 Neo4j 一起使用是个好主意吗?

                相关文章

                最新文章

                  <i id='jyUid'><tr id='jyUid'><dt id='jyUid'><q id='jyUid'><span id='jyUid'><b id='jyUid'><form id='jyUid'><ins id='jyUid'></ins><ul id='jyUid'></ul><sub id='jyUid'></sub></form><legend id='jyUid'></legend><bdo id='jyUid'><pre id='jyUid'><center id='jyUid'></center></pre></bdo></b><th id='jyUid'></th></span></q></dt></tr></i><div id='jyUid'><tfoot id='jyUid'></tfoot><dl id='jyUid'><fieldset id='jyUid'></fieldset></dl></div>
                1. <small id='jyUid'></small><noframes id='jyUid'>

                  1. <legend id='jyUid'><style id='jyUid'><dir id='jyUid'><q id='jyUid'></q></dir></style></legend>

                  2. <tfoot id='jyUid'></tfoot>
                      <bdo id='jyUid'></bdo><ul id='jyUid'></ul>