Closed jaraco closed 8 years ago
line 80 of buffer.py should be errors = 'replace'
Original comment by: Tim L
This IRC library takes the (somewhat progressive) approach of assuming UTF-8 for all input, but also provides a straightforward mechanism for clients to customize the decoding behavior. See the section Decoding Input in the Overview. The last example gives a one-line example for the supported mechanism for disabling strict decoding. If you add that to your client startup code, you'll have the behavior you seek.
Original comment by: Jason R. Coombs
Nice to see this is already addressed in the documentation but it's a rather non-sane default for the library to crash with common input. would you consider wrapping the decode in a try and printing a warning that some input was omitted due to the strict utf8 setting?
Original comment by: Tim L
Good idea.
Original comment by: Jason R. Coombs
#!python
irc.client.ServerConnection.buffer_class.errors = 'ignore'
This fixes it and lets connects much faster.
Original comment by: Yamaii
Updated changelog and readme reflecting new LenientDecodingLineBuffer. Fixes #34.
→ <
Original comment by: Jason R. Coombs
In the default configuration, if non-UTF-8 is transmitted to the client, it will crash with an error: