Results 139 comments of estk

Sounds like a worthy enhancement, happy to mentor if you'd like to take a stab at it.

@moh-eulith can you open a Draft pr with the above failing test?

Ok so I've kinda gotten to the bottom of this. There are in fact 3 unicode "characters" ie codepoints here but they result in only 2 graphemes and therefore the...

Negative, an io::Writer just takes bytes and writes them, there is no guarantee of a particular segmentation, which is why this is really only a best-effort check.

Counting graphemes seems to be enough. ```rust #[test] fn char_starts_gs() { let buf = "\u{01f5}\u{0067}\u{0301}"; let starts = char_starts(buf.as_bytes()); assert_eq!(2, starts); let buf = "a\u{0308}\u{032C}\u{0362}e\u{0301}\u{0331}"; let starts = char_starts(buf.as_bytes()); assert_eq!(2,...

No worries, yep I agree there will be miscalculations when we span a Unicode sequence, we just don't have enough information to do the right thing.

This should be super easy to impl, and happy to provide guidance to anyone interested in doing so.

Looks like Steven was able to respond to the pr in rust-log-mdc. I'm not comfortable sidestepping that process and will therefore be closing this for now.

Excellent, thanks @davidcole1340. I should have a PR for you shortly. Also, thanks for the refs, especially the test ref, I didn't know that existed.

This lgtm, @xNxExOx can you get CI passing and we'll get this merged?