moov-io / iso8583

A golang implementation to marshal and unmarshal iso8583 message.
https://moov.io
Apache License 2.0
304 stars 100 forks source link

Fix encoding non-UTF8 values in String field #298

Closed cheukwing closed 7 months ago

cheukwing commented 8 months ago

Fixes #297

One outstanding issue is what behaviour do we expect from Bytes() and SetBytes()? Currently, these return/take the UTF8 encoded bytes, regardless of the specified encoding, but it seems like it could be more appropriate to return/take bytes in the specified encoding. I tried doing this, but this led to issues with other functions in the library which expected the current behaviour, and users of this library may expect the same.

cheukwing commented 7 months ago

Closing in favour of #299