根据我的 Python,您的字符串不包含类别Cc
字符(控制字符):
>>> unicodedata.category(u'\n') in map(unicodedata.category, input_string)
False
所以这个字符串中没有换行符。unicodedata.name
证实了这一点:
>>> for c in s: print unicodedata.name(c)
...
LEFT BLACK LENTICULAR BRACKET
LATIN CAPITAL LETTER J
LATIN CAPITAL LETTER K
RIGHT BLACK LENTICULAR BRACKET
CJK UNIFIED IDEOGRAPH-9032
CJK UNIFIED IDEOGRAPH-5B66
HIRAGANA LETTER NI
CJK UNIFIED IDEOGRAPH-56F0
HIRAGANA LETTER SMALL TU
HIRAGANA LETTER TA
FULLWIDTH LATIN CAPITAL LETTER J
FULLWIDTH LATIN CAPITAL LETTER K
HIRAGANA LETTER GA
CJK UNIFIED IDEOGRAPH-5148
CJK UNIFIED IDEOGRAPH-751F
HIRAGANA LETTER NI
CJK UNIFIED IDEOGRAPH-52A9
HIRAGANA LETTER KE
HIRAGANA LETTER TE
HIRAGANA LETTER MO
HIRAGANA LETTER RA
HIRAGANA LETTER U
HIRAGANA LETTER TA
HIRAGANA LETTER ME
HIRAGANA LETTER NI
FULLWIDTH LATIN CAPITAL LETTER S
FULLWIDTH LATIN CAPITAL LETTER E
FULLWIDTH LATIN CAPITAL LETTER X
FULLWIDTH EXCLAMATION MARK
FULL STOP
LATIN SMALL LETTER M
LATIN SMALL LETTER O
LATIN SMALL LETTER V