Open Douile opened 1 year ago
Can confirm the provided byte sequence appears to contain segments that are not compliant with UTF-8. Given that UTF-8 only offers limited support for Latin-1 characters, attempting to parse these segments as UTF-8 unsurprisingly triggers a Utf8Error
. This inconsistency likely explains the sporadic nature of the issue as it occurs when an unsupported character is encountered during parsing.
Looking at this stackoverflow answer I think the encoding crate is the better choice.
Describe the bug When decoding gamespy1 packets we use UTF-8 which doesn't match node-gamedig (latin1):
https://github.com/gamedig/node-gamedig/blob/5db85aae15f3d62e4521cb6fd72c576ab41e28e6/protocols/gamespy1.js#L34-L37
Example error
Steps To Reproduce Happens randomly when parsing gamespy1 games like bf1942