search for: surrogateescap

Displaying 2 results from an estimated 2 matches for "surrogateescap".

Did you mean: surrogateescape
2017 May 21
3
[PATCH 0/2] python: improved UTF8 decoding error handling
...nable 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 similar manner as for Python 2. See PEP383 for reference. This series fixes also a bug introduced in commit 9d25b4e56471f9c33ea6229a8b620fc800c240f8. Matteo Cafasso (2): python: return bytes when return value is RBufferOut python: unicode decod...
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
...r): pass +def set_decode_error_handler(handler): + \"\"\"Set the error handling scheme to use for the handling + of decoding errors. + The default is 'strict' meaning that decoding errors raise a + UnicodeDecodeError. + + The other possible value is 'surrogateescape', see PEP383 for reference. + + Return the previous error handler. + \"\"\" + return libguestfsmod.set_decode_error_handler(handler) + + class GuestFS(object): \"\"\"Instances of this class are libguestfs API handles.\"\"\" diff --gi...