ElishaMayer / masav

MIT License
5 stars 1 forks source link

Hebrew doesnt really work #2

Open omermyaari opened 3 years ago

omermyaari commented 3 years ago

Hello, I tried to enter payee name in hebrew, but I got something else in the generated file, it seems like the characters are not being encoded well.

ElishaMayer commented 3 years ago

Did you try to upload it to masav? They use a special "old Hebrew" (EBCDIC) encoding. I tried it and only with this encoding masav recognises it. More info

ElishaMayer commented 3 years ago

If you got a problem uploading it to Masav, can you send the error code from Masav?

omermyaari commented 3 years ago

I tried to upload the file to bank leumi. it showed me english characters instead of hebrew characters. I wrote my own implementation for masav file generation, and I managed to encode the hebrew characters successfully using iconv-lite library, with 'cp862' encoding. The hebrew characters also had to be reversed but I guess this has nothing to do with the encoding.

ElishaMayer commented 3 years ago

Yes, I reverted the characters. I tested my package on Masav's program/website and there it shows the Hebrew correct only with that specific encoding. This is a very problematic encoding, because it is not really possible to enter English in the field. (The uppercase ASCII code are used for Hebrew)

ElishaMayer commented 3 years ago

I didn't know that you can upload Masav files through bank leumi. If there they use a different encoding, I can implement it as an option in the package

ElishaMayer commented 3 years ago

It looks like 'cp862' encoding, is what they call קוד עברי ב. I tried it, and as far as I remember Masav rejected the file for invalid characters