Unicode
2020-05-16
对号(对勾)
符号 |
Unicode码(Hex) |
名字 |
✓ |
U+2713 |
CHECK MARK(勾号) |
✔ |
U+2714 |
HEAVY CHECK MARK(粗勾号) |
☐ |
U+2610 |
BALLOT BOX(方格) |
☑ |
U+2611 |
BALLOT BOX WITH CHECK(打勾方格) |
√ |
U+221A |
Square Root (开平方,根号) |
错号(叉叉)
常用英文字母 x / X 或者数学中的乘法替代。
符号 |
Unicode码(Hex) |
名称 |
✗ |
U+2717 |
BALLOT X (交叉) |
✘ |
U+2718 |
HEAVY BALLOT X (粗体交叉) |
☐ |
U+2610 |
BALLOT BOX (方格) |
☒ |
U+2612 |
BALLOT BOX WITH X (带交叉方格) |
× |
U+00D7 |
乘法符号 |
⨯ |
U+2A2F |
向量积 |
✕ |
U+2715 |
Multiplication (乘法符号) |
☓ |
U+2613 |
Saltire |
✖ |
U+2716 |
Heavy Multiplication X Emoji |
ㄨ |
U+3128 |
Bopomofo Letter U |
Ⅹ |
U+2169 |
Ⅹ Roman Numeral Ten |
圈号符号
符号 |
Unicode码(Hex) |
名字 |
○ |
U+25CB |
WHITE CIRCLE |
● |
U+25CF |
BLACK CIRCLE |
◯ |
U+25EF |
LARGE CIRCLE |
参考资料与拓展阅读
JavaScript WebFrontend 字符编码 乱码问题 Unicode
2019-06-20
function base64EncodeUnicode(str) {
// First we escape the string using encodeURIComponent to get the UTF-8 encoding of the characters,
// then we convert the percent encodings into raw bytes, and finally feed it to btoa() function.
utf8Bytes = encodeURIComponent(str).replace(
/%([0-9A-F]{2})/g,
function (match, p1) {
return String.fromCharCode("0x" + p1);
},
);
return btoa(utf8Bytes);
}
x.decode('utf-8').encode('raw_unicode_escape').decode('ascii')[2:].strip('0')
Python Unicode 字符编码
2016-06-22
源代码:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
print u'中国'
报错:
Traceback (most recent call last):
File "test.py", line 4, in <module>
print u'中国'
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)