[英]what is the difference between unicode characters starting from `\U` and `\u` in python utf-8 characters support
I have 2 strings, both of which translates to the same thing in the end but in one of the representation, mysql adds the data to the db; 我有2个字符串,两个字符串最终都转换为相同的东西,但是在其中一种表示形式中,mysql将数据添加到db中。 in other, it doesn't.
另一方面,事实并非如此。
\?\?\?\?
\\U0001f1fa\\U0001f1f8
I am not able to figure out the difference between these two representations and the reason for 1 format supporting data addition in mysql. 我无法弄清楚这两种表示形式之间的区别,以及1种格式支持mysql中数据添加的原因。 Mysql connection is open in utf-8 mode.
Mysql连接以utf-8模式打开。
\\U
is 32-bit and followed with 8 hex digits, when \\u\u003c/code> is 16-bit and followed by 4 digits.
\\U
是32位,后跟8个十六进制数字,而\\u\u003c/code>是16位,后跟4个数字。
See ' https://docs.python.org/3/howto/unicode.html ' for example.
例如,请参见“ https://docs.python.org/3/howto/unicode.html ”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.