[PATCH] provision: use ASCII quotes

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Tue Mar 12 23:36:44 UTC 2019

hi Philipp,
> 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
like this:

-    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...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190313/7bcb5ae5/signature.sig>

More information about the samba-technical mailing list