launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24219
Re: [Merge] ~pappacena/launchpad:fix-encoding-css-combine into launchpad:master
Diff comments:
> diff --git a/lib/lp/scripts/utilities/js/combinecss.py b/lib/lp/scripts/utilities/js/combinecss.py
> index 1aa1072..1bb94c2 100755
> --- a/lib/lp/scripts/utilities/js/combinecss.py
> +++ b/lib/lp/scripts/utilities/js/combinecss.py
> @@ -75,9 +75,9 @@ def main():
>
> combo = ComboFile(absolute_names, target)
> if combo.needs_update():
> - result = ''
> + result = u''
> for content in combine_files(names, icing):
> - result += content
> + result += content.decode('utf8')
>
> with open(target, 'w') as f:
> - f.write(result)
> + f.write(result.encode('utf8'))
It might indeed depend on the locale encoding or something like that. But opening the file with 'wb' and writing explicitly-encoded bytes to it should take care of that; as I say, you should just need to change 'w' to 'wb' so that it expects bytes on both versions.
--
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/377331
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:fix-encoding-css-combine into launchpad:master.
References