2017-06-09 23:29
浏览 150

使用utf8_encode()的字符串的php UTF-8编码给出与结果相同的字符串

I am using this utf8_encode() function in php (using the online editor http://www.writephponline.com/). The problem is that I am getting the same string as a result. Am I doing something wrong... very very new to php. Looking for some guidance with respect to what is the correct result.


echo utf8_encode("a6ab35d3-905b-4d1e-a967-169c1aa2dd56d337e8bd-d6ae-4f3b-a4b6-0980dcbeb632");

Result is a6ab35d3-905b-4d1e-a967-169c1aa2dd56d337e8bd-d6ae-4f3b-a4b6-0980dcbeb632

图片转代码服务由CSDN问答提供 功能建议

我在php中使用这个utf8_encode()函数(使用在线编辑器 http://www.writephponline.com/ )。 问题是我得到了相同的字符串。 我做错了什么...非常非常新的PHP。 寻找关于什么是正确结果的一些指导。


  echo utf8_encode(“a6ab35d3-905b-4d1e-  a967-169c1aa2dd56d337e8bd-d6ae-4f3b-a4b6-0980dcbeb632“); 

结果是 a6ab35d3-905b-4d1e-a967-169c1aa2dd56d337e8bd-d6ae-4f3b- a4b6-0980dcbeb632

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanhuan7750 2017-06-09 23:35

    All of the characters in your string are the same in utf8 as in ASCII. Utf-8 is a variable-length encoding that stores the same values as ASCII for character codes 32 - 127.


    Try adding some accented characters to your test string.

    打赏 评论

相关推荐 更多相似问题