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

    2. <small id='Rjx7f'></small><noframes id='Rjx7f'>

    3. <legend id='Rjx7f'><style id='Rjx7f'><dir id='Rjx7f'><q id='Rjx7f'></q></dir></style></legend>

      1. 将 utf-8 编码的文本加载到 MySQL 表中

        时间:2023-05-31
          • <bdo id='1Sk5z'></bdo><ul id='1Sk5z'></ul>
          • <i id='1Sk5z'><tr id='1Sk5z'><dt id='1Sk5z'><q id='1Sk5z'><span id='1Sk5z'><b id='1Sk5z'><form id='1Sk5z'><ins id='1Sk5z'></ins><ul id='1Sk5z'></ul><sub id='1Sk5z'></sub></form><legend id='1Sk5z'></legend><bdo id='1Sk5z'><pre id='1Sk5z'><center id='1Sk5z'></center></pre></bdo></b><th id='1Sk5z'></th></span></q></dt></tr></i><div id='1Sk5z'><tfoot id='1Sk5z'></tfoot><dl id='1Sk5z'><fieldset id='1Sk5z'></fieldset></dl></div>
                <tbody id='1Sk5z'></tbody>

              <small id='1Sk5z'></small><noframes id='1Sk5z'>

                  <legend id='1Sk5z'><style id='1Sk5z'><dir id='1Sk5z'><q id='1Sk5z'></q></dir></style></legend>
                  <tfoot id='1Sk5z'></tfoot>
                  本文介绍了将 utf-8 编码的文本加载到 MySQL 表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个很大的 CSV 文件,我要将它加载到 MySQL 表中.但是,这些数据被编码为 utf-8 格式,因为它们包含一些非英文字符.我已经将表中对应列的字符集设置为utf-8.但是当我加载我的文件时.非英文字符变成奇怪的字符(当我在我的表格行上做一个选择时).在将数据加载到表中之前是否需要对数据进行编码?如果是的话,我该怎么做.我正在使用 Python 加载数据并使用 LOAD DATA LOCAL INFILE 命令.谢谢

                  I have a large CSV file that I am going to load it into a MySQL table. However, these data are encoded into utf-8 format, because they include some non-english characters. I have already set the character set of the corresponding column in the table to utf-8. But when I load my file. the non-english characters turn into weird characters(when I do a select on my table rows). Do I need to encode my data before I load the into the table? if yes how Can I do this. I am using Python to load the data and using LOAD DATA LOCAL INFILE command. thanks

                  推荐答案

                  如 http://dev.mysql.com/doc/refman/5.1/en/load-data.html,您可以使用 LOAD DATA LOCAL INFILE 的CHARACTER SET"可选参数指定 CSV 文件使用的字符集

                  as said in http://dev.mysql.com/doc/refman/5.1/en/load-data.html, you can specify the charset used by your CSV file with the "CHARACTER SET" optional parameter of LOAD DATA LOCAL INFILE

                  这篇关于将 utf-8 编码的文本加载到 MySQL 表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:必须转义哪些字符以防止 (My)SQL 注入? 下一篇:将数据从javascript发送到mysql数据库

                  相关文章

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

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

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

                    <tfoot id='il0sj'></tfoot>
                    • <bdo id='il0sj'></bdo><ul id='il0sj'></ul>