Unverified Commit 731221c3 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Improve documentation on decodeSyslog (#27039)

It appears that the encoding Apple is using to ensure their syslog
conforms with the syslog requirement for seven-bit ASCII encoding (see:
RFC 5424) is `vis`.

Details: https://www.freebsd.org/cgi/man.cgi?query=vis&sektion=3
parent 789376b8
...@@ -387,7 +387,7 @@ class IOSDevice extends Device { ...@@ -387,7 +387,7 @@ class IOSDevice extends Device {
} }
} }
/// Decodes an encoded syslog string to a UTF-8 representation. /// Decodes a vis-encoded syslog string to a UTF-8 representation.
/// ///
/// Apple's syslog logs are encoded in 7-bit form. Input bytes are encoded as follows: /// Apple's syslog logs are encoded in 7-bit form. Input bytes are encoded as follows:
/// 1. 0x00 to 0x19: non-printing range. Some ignored, some encoded as <...>. /// 1. 0x00 to 0x19: non-printing range. Some ignored, some encoded as <...>.
...@@ -397,6 +397,8 @@ class IOSDevice extends Device { ...@@ -397,6 +397,8 @@ class IOSDevice extends Device {
/// 5. 0xa0: octal representation \240. /// 5. 0xa0: octal representation \240.
/// 6. 0xa1 to 0xf7: \M-x (where x is the input byte stripped of its high-order bit). /// 6. 0xa1 to 0xf7: \M-x (where x is the input byte stripped of its high-order bit).
/// 7. 0xf8 to 0xff: unused in 4-byte UTF-8. /// 7. 0xf8 to 0xff: unused in 4-byte UTF-8.
///
/// See: [vis(3) manpage](https://www.freebsd.org/cgi/man.cgi?query=vis&sektion=3)
String decodeSyslog(String line) { String decodeSyslog(String line) {
// UTF-8 values for \, M, -, ^. // UTF-8 values for \, M, -, ^.
const int kBackslash = 0x5c; const int kBackslash = 0x5c;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment