Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #112349 > unrolled thread
| Started by | Random832 <random832@fastmail.com> |
|---|---|
| First post | 2016-08-04 15:45 -0400 |
| Last post | 2016-08-04 15:45 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Capturing the bad codes that raise UnicodeError exceptions during decoding Random832 <random832@fastmail.com> - 2016-08-04 15:45 -0400
| From | Random832 <random832@fastmail.com> |
|---|---|
| Date | 2016-08-04 15:45 -0400 |
| Subject | Re: Capturing the bad codes that raise UnicodeError exceptions during decoding |
| Message-ID | <mailman.177.1470339927.6033.python-list@python.org> |
On Thu, Aug 4, 2016, at 15:22, Malcolm Greene wrote: > Hi Chris, > > Thanks for your suggestions. I would like to capture the specific bad > codes *before* they get replaced. So if a line of text has 10 bad codes > (each one raising UnicodeError), I would like to track each exception's > bad code but still return a valid decode line when finished. Look into writing your own error handler - there's enough information provided to do this. https://docs.python.org/3/library/codecs.html
Back to top | Article view | comp.lang.python
csiph-web