Displaying 2 results from an estimated 2 matches for "f7c1f80bb".
2017 May 21
3
[PATCH 0/2] python: improved UTF8 decoding error handling
The Python 3 bindings currently are unable to deal with non UTF8 characters.
This series continues what proposed in RHBZ#1406906.
A new function 'set_decode_error_handler' allows the User to specify
how to deal with decoding errors.
The default behaviour will be raising a UnicodeDecodeError.
If the handler is changed to 'surrogateescape', non UTF8 characters will be escaped
in a
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
...o <noxdafox@gmail.com>
---
generator/python.ml | 16 ++++++++++++++++
python/handle.c | 18 ++++++++++++++++--
python/t/test830RHBZ1406906.py | 6 ++++++
3 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/generator/python.ml b/generator/python.ml
index f7c1f80bb..66bb7f27d 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -82,6 +82,7 @@ put_handle (guestfs_h *g)
}
extern void guestfs_int_py_extend_module (PyObject *module);
+extern PyObject *guestfs_int_py_set_decode_error_handler (PyObject *self, PyObject *args);
extern PyObject *guestfs_...