zemuldo / iso_8583

:credit_card::moneybag: JavaScript library for iso 8583 messaging. Handles message validation & conversion between interfaces using iso 8583 standard. Contributors are welcome.
https://zemuldo.github.io/iso_8583/
MIT License
85 stars 50 forks source link

4 UTF-8 string as indicator message length #128

Open gultom opened 1 year ago

gultom commented 1 year ago

First of all, thank you for this library. Help me a lot!! Just wondering that how i can set indicator message length is using 4 utf8 string than using hex encoding for send and receive? Thank you!

zemuldo commented 1 year ago

Thanks. This library defaults to using 2 bytes for the length Indicator. It will require a tweak to make that work. Setting a configurable encoding for the length indicator for example.

As a work around, you can set it to false using {lenHeader: false} in config during encoding then add it manually while removing it from the buffer before decoding.