Hey Tom, Tom Gundersen [2015-02-18 14:34 +0100]: > I think we want to assume that we only get UTF-16LE, so it looks like > it is the test that is buggy. That's what we agreed, right Lennart?
Ah, ok. Indeed GUID partition names are UTF16LE. I couldn't quickly find a reference for EFI variables (which is the main thing we are using this for), and I don't have/know a big-endian EFI machine to check this on. I found http://uefi.blogspot.de/2009/12/uefi-hii-part-7-character-encoding.html which raises the endianness question (but doesn't answer it), and https://en.wikipedia.org/wiki/UTF-16 says both LE and BE are possible. > How about the attached patch? Confirmed to work on powerpc (BE) and x86_64 (LE). So if EFI variables are defined to be UTF16LE always, your patch is correct. Thanks! Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
signature.asc
Description: Digital signature
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel