Status: Accepted
Owner: ----
Labels: Type-Enhancement Target-2.7.7 Priority-Medium bwic

New issue 1328 by pekka.klarck: Telnet library: Encoding errors should be ignored by default and error handler should be configurable
http://code.google.com/p/robotframework/issues/detail?id=1328

RF 2.7.6 added a possibility to specify encoding and started to use UTF-8 by default (issue 1312). That was a backwards-incompatible change because earlier versions used ASCII but ignored possible encoding errors (although that wasn't always done as issue 1310 demonstrates).

For backwards-compatibility reasons we should change encoding/decoding to ignore error by default. Additionally the error handler should be made configurable.

A natural way to make the error handler configurable is adding a new `encoding_errors` argument to __init__, open_connection, and set_encoding after the already accepted `encoding` argument. A problem with the two first ones is that after `encoding` there is `default_log_level` argument so the change is backwards-incompatible. Because `default_log_level` was also added in RF 2.7.6 it probably isn't used a lot yet, and because it is most likely used as a named argument (e.g. `default_log_level='DEBUG'`), adding a new argument before it ought to be safe.

Reply via email to