Pickling russian strings
lummert
_nospam_lummert at netcologne.de
Thu Aug 15 14:29:08 EDT 2002
DR,
using python 2.1.3 I had no problems with the following script:
import pickle
rus = "\u0444"
fh = open('rus.dmp','wb')
bin = 1
pickle.dump(rus,fh,bin)
fh.close()
del rus
fh = open('rus.dmp','rb')
rus = pickle.load(fh)
print rus
it returns:
\u0444
the same when setting binary mode (bin) to 0.
When you encounter problems with older versions, maybe
you should use binary mode with pickle.dump().
Cheers
robert
More information about the Python-list
mailing list