Groundwork for multi codepage support

This commit is contained in:
Matthew R. Wilson committed 2025-11-14 23:54:11 -08:00
1 parent c0ad185cd7
commit 2f96d51ac3
3 files changed
+116 -59

No files matched your search

+2 -2
View File
@@ -160,7 +160,7 @@ func readFields(c net.Conn, fm fieldmap, cols int) (map[string]string, error) {
if eor {
// Finish the current field
if infield {
value := decode(fieldval.Bytes())
value := currentCodepage.Decode(fieldval.Bytes())
debugf("Field %d: %s\n", fieldpos, value)
handleField(fieldpos, value, fm, values)
}
@@ -172,7 +172,7 @@ func readFields(c net.Conn, fm fieldmap, cols int) (map[string]string, error) {
if b == 0x11 {
// Finish the previous field, if necessary
if infield {
value := decode(fieldval.Bytes())
value := currentCodepage.Decode(fieldval.Bytes())
debugf("Field %d: %s\n", fieldpos, value)
handleField(fieldpos, value, fm, values)
}