)]}'
{"users/Profpatsch/netencode/pretty.rs":[{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"323397bff026d8bce90517bb5bdcd06a588504ee","unresolved":true,"context_lines":[{"line_number":42,"context_line":"                leader: format!(\"b{}:\", s.len()),"},{"line_number":43,"context_line":"                // For pretty printing we want the string to be visible obviously."},{"line_number":44,"context_line":"                // Instead of not supporting binary, let’s use lossy conversion."},{"line_number":45,"context_line":"                val: String::from_utf8_lossy(s).into_owned(),"},{"line_number":46,"context_line":"                trailer: \u0027,\u0027"},{"line_number":47,"context_line":"            },"},{"line_number":48,"context_line":"            U::Sum(Tag{tag, val}) \u003d\u003e Self::pretty_tag(tag, Self::from_u(*val)),"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"1d7ac4fc_3e1f9072","line":45,"updated":"2021-02-14 16:34:33.000000000","message":"What about trying to decode binary using utf-8 and if fails just hexdumping the slice (or using Debug)?","commit_id":"da7ea5cd30e744e90bc0b01b47f870e0750f8def"},{"author":{"_account_id":1000013,"name":"Profpatsch","email":"mail@profpatsch.de","username":"Profpatsch"},"change_message_id":"198f49354b2a9e4521a9ab31b12f926f65c9b300","unresolved":true,"context_lines":[{"line_number":42,"context_line":"                leader: format!(\"b{}:\", s.len()),"},{"line_number":43,"context_line":"                // For pretty printing we want the string to be visible obviously."},{"line_number":44,"context_line":"                // Instead of not supporting binary, let’s use lossy conversion."},{"line_number":45,"context_line":"                val: String::from_utf8_lossy(s).into_owned(),"},{"line_number":46,"context_line":"                trailer: \u0027,\u0027"},{"line_number":47,"context_line":"            },"},{"line_number":48,"context_line":"            U::Sum(Tag{tag, val}) \u003d\u003e Self::pretty_tag(tag, Self::from_u(*val)),"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"6b71b044_200e6eb2","line":45,"in_reply_to":"1d7ac4fc_3e1f9072","updated":"2021-02-24 13:12:24.000000000","message":"Hm, it’s probably better than using replacement chars … idk","commit_id":"da7ea5cd30e744e90bc0b01b47f870e0750f8def"},{"author":{"_account_id":1000013,"name":"Profpatsch","email":"mail@profpatsch.de","username":"Profpatsch"},"change_message_id":"d33a6450676e3f98de33538759d2cf9284834f32","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                leader: format!(\"b{}:\", s.len()),"},{"line_number":43,"context_line":"                // For pretty printing we want the string to be visible obviously."},{"line_number":44,"context_line":"                // Instead of not supporting binary, let’s use lossy conversion."},{"line_number":45,"context_line":"                val: String::from_utf8_lossy(s).into_owned(),"},{"line_number":46,"context_line":"                trailer: \u0027,\u0027"},{"line_number":47,"context_line":"            },"},{"line_number":48,"context_line":"            U::Sum(Tag{tag, val}) \u003d\u003e Self::pretty_tag(tag, Self::from_u(*val)),"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"40648f81_264659df","line":45,"in_reply_to":"3e8fc8d3_da8eb1bf","updated":"2021-04-01 11:32:47.000000000","message":"Given that I expect most binary data to be best-effort ASCII anyway … hm. I guess something akin to what hexdump does would be the best?\n\nOTOH utf-8 is basically ascii, and with replacement chars you get the same as the `hexdump -C` right-hand side I think?","commit_id":"da7ea5cd30e744e90bc0b01b47f870e0750f8def"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"5be05a6330a8614845e950b89bb2de1f206dc31c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                leader: format!(\"b{}:\", s.len()),"},{"line_number":43,"context_line":"                // For pretty printing we want the string to be visible obviously."},{"line_number":44,"context_line":"                // Instead of not supporting binary, let’s use lossy conversion."},{"line_number":45,"context_line":"                val: String::from_utf8_lossy(s).into_owned(),"},{"line_number":46,"context_line":"                trailer: \u0027,\u0027"},{"line_number":47,"context_line":"            },"},{"line_number":48,"context_line":"            U::Sum(Tag{tag, val}) \u003d\u003e Self::pretty_tag(tag, Self::from_u(*val)),"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"97962d63_8603008c","line":45,"in_reply_to":"40648f81_264659df","updated":"2021-04-01 12:55:51.000000000","message":"I would just hex format everything which is in binary or alternatively throw away the binary / text distinction altogether if you expect it to be best effort ASCII, then Text would be the default?!\n\nI\u0027d intuitively expect Text to be UTF-8 and Binary to be anything else for which completely hexdumping seems like the sanest pretty print option.","commit_id":"da7ea5cd30e744e90bc0b01b47f870e0750f8def"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"3bbfef2bba0f74fde6fde468a7215dd3b873f5fd","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                leader: format!(\"b{}:\", s.len()),"},{"line_number":43,"context_line":"                // For pretty printing we want the string to be visible obviously."},{"line_number":44,"context_line":"                // Instead of not supporting binary, let’s use lossy conversion."},{"line_number":45,"context_line":"                val: String::from_utf8_lossy(s).into_owned(),"},{"line_number":46,"context_line":"                trailer: \u0027,\u0027"},{"line_number":47,"context_line":"            },"},{"line_number":48,"context_line":"            U::Sum(Tag{tag, val}) \u003d\u003e Self::pretty_tag(tag, Self::from_u(*val)),"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"3e8fc8d3_da8eb1bf","line":45,"in_reply_to":"6b71b044_200e6eb2","updated":"2021-02-24 21:56:08.000000000","message":"If you actually have binary data in Binary, yes. Your call.","commit_id":"da7ea5cd30e744e90bc0b01b47f870e0750f8def"}]}
