<legend id='RVJ56'><style id='RVJ56'><dir id='RVJ56'><q id='RVJ56'></q></dir></style></legend>
        • <bdo id='RVJ56'></bdo><ul id='RVJ56'></ul>

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

        <tfoot id='RVJ56'></tfoot>
        <i id='RVJ56'><tr id='RVJ56'><dt id='RVJ56'><q id='RVJ56'><span id='RVJ56'><b id='RVJ56'><form id='RVJ56'><ins id='RVJ56'></ins><ul id='RVJ56'></ul><sub id='RVJ56'></sub></form><legend id='RVJ56'></legend><bdo id='RVJ56'><pre id='RVJ56'><center id='RVJ56'></center></pre></bdo></b><th id='RVJ56'></th></span></q></dt></tr></i><div id='RVJ56'><tfoot id='RVJ56'></tfoot><dl id='RVJ56'><fieldset id='RVJ56'></fieldset></dl></div>
      1. PHP UTF-8 转 Windows 命令行编码

        时间:2023-09-25
      2. <small id='aV0oc'></small><noframes id='aV0oc'>

        <tfoot id='aV0oc'></tfoot>

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

              <tbody id='aV0oc'></tbody>

                  <bdo id='aV0oc'></bdo><ul id='aV0oc'></ul>
                  本文介绍了PHP UTF-8 转 Windows 命令行编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  一切都在问题中:我有一个 UTF-8 文件的 PHP 脚本.在这个脚本中,我想这样做:

                  Everything is in the question : I have a Php script that is a UTF-8 file. In this script I want to do this :

                    <?
                    echo "âêïû
                  ";
                    ?>
                  

                  如果我在 Windows 提示符下运行它,我会得到这个:

                  If I run it in a Windows prompt I get this :

                  C:php>php -c C:WINDOWSphp.ini -f mysqldump.php
                  âêïû
                  C:php>
                  

                  我一直无法找到正确的转换方案.我也试过这个代码:

                  I've not been able to find the right conversion scheme. I've tried also this code :

                  $tab = mb_list_encodings();
                  foreach ($tab as $enc1) {
                    foreach ($tab as $enc2) {
                      $t=mb_convert_encoding("âêïû
                  ", $enc1, $enc2);
                      if (strlen($t)<14) {
                        echo $enc1." ".$enc2." = ".$t."
                  ";
                      }
                    }
                  }
                  

                  我没有找到正确的转换!

                  And I didn't find the right conversion !

                  任何帮助将不胜感激

                  推荐答案

                  你让我走上了正轨,但出现了一些问题(我喜欢 Windows o/):

                  You put me on the right track but there was kinddof a problem (I love Windows o/) :

                  C:php>chcp 65001
                  Page de codes active : 65001
                  C:php>php -c C:WINDOWSphp.ini -f mysqldump.php | more
                  Mémoire insuffisante.
                  

                  Mémoire insuffisante = 内存不足.

                  Mémoire insuffisante = not enough memory.

                  如果我尝试

                  C:php>chcp 1252
                  C:php>php -c C:WINDOWSphp.ini -f mysqldump.php
                  C:php>ééîîïïÂÂÂÂâûü
                  

                  它有效.只有上帝知道为什么.但它有效.谢谢你让我走上正轨!!

                  it works. Only God knows why. But it works. Thanks for putting me on the right track !!

                  顺便说一句,php代码正确地形成UTF8到命令提示符是:

                  By the way the php code to go properly form UTF8 to command prompt is :

                    echo mb_convert_encoding($utf8_string, "pass", "auto");
                  

                  这篇关于PHP UTF-8 转 Windows 命令行编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Windows CMD.exe“系统找不到指定的路径." 下一篇:在 Windows 命令提示符 (cmd) 中运行 .php 文件

                  相关文章

                  最新文章

                • <tfoot id='TuFtI'></tfoot>

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

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