1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-23 20:59:10 +03:00
Files
samba-mirror/python/samba
David Mulder 0f3066abbb gpo: Properly decode utf-8/16 inf files from bytes
This code was python 2 specific (string handling
has changed dramatically in python 3), and didn't
correctly decode utf-16 in python3. We should
instead read the file as bytes, then attempt a
utf-8 decode (the default), and try utf-16 if
encountering a decode failure.
The existing code actually throws an exception on
the initial file read when the data is utf-16,
since it tries to decode the bytes to a utf-8
string.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-08-06 16:38:36 +00:00
..
2020-06-05 10:32:30 +00:00
2019-07-02 02:23:08 +00:00
2018-11-01 05:08:14 +01:00