How can I test if a python distribution has unicode properties -


where possible, want use unicode python string u"\u0001d54d" if there problems displaying it, use "v".

on system unicode prints. on others displays nothing (i assume there .encode("ascii","ignore") type thing happening) or

unicodeencodeerror: 'ascii' codec can't encode character u'\u0001d54d' in position 14: ordinal not in range(128) 

depending on function... both bad.

is there test can determine whether or not use special character? or more complicated that?

the displaying part depends on going print. python encodes output whatever encoding terminal application using. can check environment vars sure chars defined in locale need, example:

import os  if os.environ.get('lc_all') == 'es_es.utf8':     # know 'es_es.utf8' has character ... 

also check lc_ctype


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -