iso8583
iso8583 copied to clipboard
Garbage printed when Describing field with binary encoding
Hi, In describe, the values of binary coded fields are not converted to hexadecimal. Proposed fix in describe.go: ... field := fields[i] desc := field.Spec().Description var str string if field.Spec().Enc == encoding.Binary { b, err := field.Bytes() if err != nil { errorList = append(errorList, err.Error()) continue } str = strings.ToUpper(hex.EncodeToString(b)) } else { str, err = field.String() if err != nil { errorList = append(errorList, err.Error()) continue } } fmt.Fprintf(tw, fmt.Sprintf("F%03d %s\t: %%s\n", i, desc), str) ... Regards