Skip to content

Dealing with incorrect encoding #278

@freddyb

Description

@freddyb

The realities of IRC in the year of 2026 appear to be that there are still folks that prefer using their ISO-8859-1 or some other abomination of an encoding. These people on a server that is widely utf-8. The resulting mismatch leads to unparsed messages from the irc crate, as the encoding is specified per config (eg per server).
It would be useful if I could make my irc client more forgiving by allowing lossy decoding.

Right now, if I were to use a fork of the irc crate, I could just replace String::from_utf8() with `String::from_utf8_lossy().
Would there be an interest in specifying an lossy-encoding feature such that others can make use of it?

Cf.

match String::from_utf8(line.to_vec()) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions