On Mon, Feb 04, 2019 at 09:29:42AM +0100, Johannes Berg wrote: > So you say you want to use utf-8 instead of ASCII? > > I guess that's fine. We could debate whether the encoding should then be > done by the test itself, which knows to expect UTF-8, or the framework > like here. It feels slightly safer to me to enforce ASCII in the > framework, and have this particular test .encode('utf-8') (and use b'' > for other strings) so that it's clear in the test that it actually wants > to send utf-8 encoded bytes to the supplicant binary. The thing is, the > supplicant doesn't actually look at the encoding in any way, it just > treats it as opaque bytes. > > But the additional "safety" that I'm thinking of would anyway be > something we never had with python2, so I guess it doesn't matter. I did this a bit differently yesterday to handle encoding errors with exceptions and use strings for the control interface since this does not really use binary in practice: https://w1.fi/cgit/hostap/commit/?h=pending&id=7c77cf3e1b8c7bf859c5adb944fcd21947a56fd9 I guess it could be modified to do something different, but that can be additional cleanup after this large set of patches is in. I don't really want to see 50 patch series being sent multiple times (or well, not even once to be honest.. would be nicer to go through smaller sets multiple times to simplify review and potential cleanup work). -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap