mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-19 01:22:38 +01:00
Use the detected charset (irc)
This commit is contained in:
parent
e7fcb25107
commit
f4fb83e787
@ -277,7 +277,7 @@ func (b *Birc) handlePrivMsg(event *irc.Event) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
flog.Debugf("detected %s confidence %#v", result.Charset, result.Confidence)
|
flog.Debugf("detected %s confidence %#v", result.Charset, result.Confidence)
|
||||||
r, err = charset.NewReader(result.Charset, strings.NewReader(msg))
|
mycharset = result.Charset
|
||||||
// if we're not sure, just pick ISO-8859-1
|
// if we're not sure, just pick ISO-8859-1
|
||||||
if result.Confidence < 80 {
|
if result.Confidence < 80 {
|
||||||
mycharset = "ISO-8859-1"
|
mycharset = "ISO-8859-1"
|
||||||
|
Loading…
Reference in New Issue
Block a user