[PATCH] provision: use ASCII quotes
douglas.bagnall at catalyst.net.nz
Tue Mar 12 23:36:44 UTC 2019
> provisioning on a C locale breaks for me on devel master / commit
> a68e8af2d1, running under Python 3. Error output see the bottom
> of the mail. The problem is that open(…).read() trips over the
> Unicode quotes in the license blurb of extended-rights.ldif.
Your patch is obviously good, but it is not quite perfect.
This exact string ("(“this documentation”)") has already caused the
trouble in https://bugzilla.samba.org/show_bug.cgi?id=13826 where
it refers to a file directly downloaded from Microsoft documentation.
In that case we don't want edit the file. Instead we do something
- input_file = open(input_file_name, "r")
+ input_file = io.open(input_file_name, "rt", encoding='utf8')
source4/setup/extended-rights.ldif doesn't look to be directly
downloaded or machine generated, but it looks *close*, and there might
be others we haven't found yet.
So, my question is: does adding "encoding='utf8'" in the right place
in read_and_sub_file() also solve the problem?
If it does, I would prefer that.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: OpenPGP digital signature
More information about the samba-technical