php - How can such a link encoding be ASCII? How to convert to utf8 (see the main content for the link)?
淡淡烟草味
淡淡烟草味 2017-06-13 09:21:57
0
2
825
$text = 'https://test.com/api/Center/ScanCode/user_id/1/shengle/1.html';
mb_detect_encoding($text)

The printed encoding is ASCII. I want to convert it to utf-8. I have searched many methods but failed

Is there anyone who knows?
Please give me some advice. Thank you! ! !

"Built-in validation reader read \"\" instead of \"https://test.com/api/Center/ScanCode/user_id/1/shengle/1.html\".\r\n                     Adjust your parameters to increase readability or disable built-in validation.1"

Sorry, I just remembered after seeing the reply. I finally want to solve this problem. In fact, I want to generate a QR code for this link, and occasionally this error will be reported. I will check if it is an encoding problem and want to transfer it. If there is no need to transfer it, In terms of coding, do you know what the problem is?

淡淡烟草味
淡淡烟草味

reply all(2)
伊谢尔伦

In fact, it is very simple and cannot be converted because all the contents in your string are in ASCII, so it will be printed out as ASCII, and ASCII is a subset of UTF-8, so there is no need to convert it. You just need to call iconv to convert it and then use mb_detect_encoding. I found it was still ascii. Because in UTF-8, everything that can be represented by the ASCII character set is expressed in ASCII. The same goes for other encodings. ascii encoding is a subset of all other encodings

大家讲道理

Is there no expert to answer this question?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template