Message256608
I think what David was trying to say is that you could do
try:
user_input.encode(encoding)
except UnicodeError:
do_my_error_handling()
since UnicodeError is a super class of UnicodeDecodeError and UnicodeEncodeError. |
|
Date |
User |
Action |
Args |
2015-12-17 16:26:53 | SilentGhost | set | recipients:
+ SilentGhost, loewis, vstinner, ezio.melotti, r.david.murray, spaceone |
2015-12-17 16:26:53 | SilentGhost | set | messageid: <1450369613.27.0.523050959488.issue25880@psf.upfronthosting.co.za> |
2015-12-17 16:26:53 | SilentGhost | link | issue25880 messages |
2015-12-17 16:26:53 | SilentGhost | create | |
|