liblog: display valid utf8 characters with 'printable' log format
This started as a change to use mbrtowc() instead of utf8_character_length() as mbrtowc() does everything that utf8_character_length() intends to do, but is a libc function. The change was further intended to add unit tests to ensure that these functions operate as intended. It turns out that utf8_character_length() returned an error for the utf8 characters that I tested, so this also has the side effect of allowing valid utf8 characters to be printed in the 'printable' log format, which was the original intention. Also, print the binary data as hex instead of octal, since it is a more suitable choice. Test: new unit tests, existing unit tests, logcat -v printable Change-Id: I4cc95aee81519411ef47892ca74eb31117c972d2
Loading
Please register or sign in to comment