• Chris Bracken's avatar
    Decode syslog-encoded iOS logs (#14075) · 6a42ed3f
    Chris Bracken authored
    Apple encodes syslog entries using a 7-bit encoding where input UTF-8 bytes
    are encoded as follows:
    1. 0x00 to 0x19: non-printing range. Some ignored, some encoded as <...>.
    2. 0x20 to 0x7f: as-is, with the exception of 0x5c (backslash).
    3. 0x5c (backslash): octal representation \134.
    4. 0x80 to 0x9f: \M^x (using control-character notation for range 0x00 to 0x40).
    5. 0xa0: octal representation \240.
    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.
    
    As there doesn't appear to be a system tool to decode these strings, we
    implement here in Dart. If we're unable to decode a string (e.g.
    decoding results in an invalid UTF-8 string), we fall back to emitting
    the log line as-is.
    6a42ed3f
Name
Last commit
Last update
..
android Loading commit data...
base Loading commit data...
commands Loading commit data...
dart Loading commit data...
data Loading commit data...
ios Loading commit data...
replay Loading commit data...
runner Loading commit data...
src Loading commit data...
analytics_test.dart Loading commit data...
application_package_test.dart Loading commit data...
artifacts_test.dart Loading commit data...
asset_bundle_package_fonts_test.dart Loading commit data...
asset_bundle_package_test.dart Loading commit data...
asset_bundle_test.dart Loading commit data...
asset_bundle_variant_test.dart Loading commit data...
base_utils_test.dart Loading commit data...
bug_report_test.dart Loading commit data...
cache_test.dart Loading commit data...
channel_test.dart Loading commit data...
compile_test.dart Loading commit data...
config_test.dart Loading commit data...
crash_reporting_test.dart Loading commit data...
dart_dependencies_test.dart Loading commit data...
dependency_checker_test.dart Loading commit data...
devfs_test.dart Loading commit data...
device_test.dart Loading commit data...
flutter_manifest_test.dart Loading commit data...
forbidden_imports_test.dart Loading commit data...
hot_test.dart Loading commit data...
protocol_discovery_test.dart Loading commit data...
resident_runner_test.dart Loading commit data...
stop_test.dart Loading commit data...
trace_test.dart Loading commit data...
utils_test.dart Loading commit data...
version_test.dart Loading commit data...
vmservice_test.dart Loading commit data...