Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 286 Bytes

200603141710.txt.md

File metadata and controls

12 lines (10 loc) · 286 Bytes

-- coding: cp936 --

CODEPAGE = 'cp936'

输入ANSI串,返回Unicode串。该函数可以将'\xBA\xBA\xD7\xD6'转成'\x49\x6C\x57\x5B'。

def AnsiToUnicode ( sth ) : return( sth.decode( CODEPAGE ).encode( 'unicode_internal' ) )

end of AnsiToUnicode