If eg a DESCRIPTION field contains non-ASCII, package_deb will throw an exception: *** 0137: ctrlfile.write(u'%s\n' % unicode(textwrap.fill(description.strip(), width=74, initial_indent=' ', subsequent_indent=' '))) 0138: 0139: else: 0140: ctrlfile.write(unicode(c % tuple(pullData(fs, localdata)))) 0141: except KeyError: Exception: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 45: ordinal not in range(128)
Rather than package specific backends falling over this kind of issue we should sanity check the various fields in insane.bbclass for these kinds of issues. I know upper case and certain symbols can cause issues in some fields for example.
A couple of patches sent to the community, so under reviewed now.
Considering I filed this last year I should have been more explicit. Debian control files are defined to be in UTF-8, so we should just use a UTF-8 encoder when writing the files instead of ASCII. RPM also appears to be UTF-8. Not sure about opkg right now, I suspect it just assumes ASCII-compatible and hopes for the best...
V2 patch sent to the ML. This time, invalid characters are considered those non-UTF8.
Patch merged on master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=1019d8c802d426e0692f3b5939fa34fb46ff002d