[OE-core] [PATCH 1/9] lib/oe/patch: handle non-UTF8 encoding when reading patches

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Tue Sep 6 15:50:02 UTC 2016


Paul Eggleton <paul.eggleton-VuQAYsv1563Yd54FQh9/CA at public.gmane.org>
writes:

> When extracting patches from a git repository with PATCHTOOL = "git" we
> cannot assume that all patches will be UTF-8 formatted, so as with other
> places in this module, try latin-1 if utf-8 fails.

This will probably not work when patch contains a character between 128
and 159 (which is a blackhole in all locales afaik).

I would read the file as a binary ('rb' instead of 'r') and make the
GitApplyTree.* strings a 'bytes' type.


Enrico



More information about the Openembedded-core mailing list