http://www.un.org。
下面的印刷显示了我的预期价值。
(sys.stdout.encoding and sys.stdin.encoding are UTF-8 )。
为什么变量价值不同于其印刷价值? 我需要将原材料变成一个变量。
>>username = Joxc3xa3o
>>username.decode( utf-8 ).encode( latin-1 )
Joxe3o
>>print username.decode( utf-8 ).encode( latin-1 )
João
www.un.org/Depts/DGACM/index_spanish.htm
I m 有一个问题,质疑BD,把价值分解成Avre。
我确认了我的行文—— 变式
select property_value from database_properties 地点 property_name= NLS_CHARACTERSET ;
AL32UTF8 stores characters beyond U+FFFF as four bytes (exactly as Unicode defines
UTF-8). Oracle’s “UTF8” stores these characters as a sequence of two UTF-16 surrogate
characters encoded using UTF-8 (or six bytes per character)
os.environ["NLS_LANG"] = ".AL32UTF8"
....
conn_data = str( %s/%s@%s ) % (db_usr, db_pwd, db_sid)
sql = "select user_name apex.users 地点 user_id = %s " % userid
...
cursor.execute(sql)
ldap_username = cursor.fetchone()
...
地点
print ldap_username
>> Joxc3xa3o
我把这两人都进行了审判(回过来)。
ldap_username.decode( utf-8 )
>>u Joxe3o
unicode(ldap_username, utf-8 )
>>u Joxe3o
地点
u João .encode( utf-8 )
>> Joxc3xa3o
如何回答问题?