• <small id='AGsPN'></small><noframes id='AGsPN'>

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

        如何用它们在 PHP 中基于的特殊字符替换特殊字符

        时间:2023-05-21
            • <bdo id='iDgP9'></bdo><ul id='iDgP9'></ul>

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

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

                  <legend id='iDgP9'><style id='iDgP9'><dir id='iDgP9'><q id='iDgP9'></q></dir></style></legend>

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

                  本文介绍了如何用它们在 PHP 中基于的特殊字符替换特殊字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  如何更换:

                  • ã"与a"
                  • é"与e"

                  在 PHP 中?这可能吗?我在某处读到过,我可以用基本字符的 ascii 值和重音的 ascii 值进行一些数学计算,但我现在找不到任何参考资料.

                  in PHP? Is this possible? I've read somewhere I could do some math with the ascii value of the base character and the ascii value of the accent, but I can't find any references now.

                  推荐答案

                  此答案不正确.我写的时候不理解 Unicode Normalization.看 francadaval 的评论和链接

                  查看 Normalizer 类来执行此操作.文档很好,所以我只是链接它而不是在这里重复:

                  Check out the Normalizer class to do this. The documentation is good, so I'll just link it instead of repeating things here:

                  http://www.php.net/manual/en/class.normalizer.php

                  具体来说,该类的 normalize 成员:

                  Specifically, the normalize member of that class:

                  http://www.php.net/manual/en/normalizer.normalize.php

                  请注意,Unicode 规范化有多种形式,您似乎想要规范化形式 KD (NFKD) 兼容性分解,但您应该阅读文档以确保.

                  Note that Unicode normalization has several forms, and you seem to want Normalization Form KD (NFKD) Compatibility Decomposition, though you should read the documentation to make sure.

                  您不应该尝试为此推出自己的函数:可能出错的事情太多了,使用提供的函数是一个更好的主意.

                  You shouldn't try to roll your own function for this: There's way too many things that can go wrong, and using the provided function is a much better idea.

                  这篇关于如何用它们在 PHP 中基于的特殊字符替换特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何以最聪明的方式替换 PHP 中不同的换行样式 下一篇:如何使用标签的 id 去除标签及其所有内部 html?

                  相关文章

                  最新文章

                2. <legend id='1x924'><style id='1x924'><dir id='1x924'><q id='1x924'></q></dir></style></legend>
                  • <bdo id='1x924'></bdo><ul id='1x924'></ul>

                    <tfoot id='1x924'></tfoot>

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

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