salesking / sepa_king

Ruby gem for creating SEPA XML files
MIT License
149 stars 118 forks source link

Extend allowed characters in `InstanceMethods.convert_text` #92

Open kiriakosv opened 3 years ago

kiriakosv commented 3 years ago

Hello,

we're using this gem to initiate credit transfers for Greek banks.

The problem is that names of initiating parties and account beneficiaries can be in Greek. As we see here, the only letter characters allowed are Latin and German. This results in empty strings and therefore validation errors.

Would you accept a PR that adds Greek letters to the allowed set?

flooose commented 3 years ago

We've got a similar issue with letters that have diacritics (áéó, and co. :) ).

According to the Excel sheet on the page you link to here, there should also be a lot more supported characters.

I'd also be happy to help with an MR. If it was just a handful of characters, I'd simply go ahead and submit the PR, but there with so many that aren't supported right now, that could turn into an unwieldy regex :)

@kiriakosv do you have any thoughts on this?

stayhero commented 2 years ago

We are having a similar issue with cyrillic characters (Bulgarian account holder). I would prefer if the suggested conversion table (according to the linked Excel sheet) could be used, instead of just converting non-latin characters to an empty character (e.g. 'И' would become 'I').

The PR only extends the allowed chars but I guess the better solution would be to translate the characters according to the EPC217-08 conversion table? Would you be interested in a PR?

kiriakosv commented 2 years ago

We are having a similar issue with cyrillic characters (Bulgarian account holder). I would prefer if the suggested conversion table (according to the linked Excel sheet) could be used, instead of just converting non-latin characters to an empty character (e.g. 'И' would become 'I').

The PR only extends the allowed chars but I guess the better solution would be to translate the characters according to the EPC217-08 conversion table? Would you be interested in a PR?

Sure! I'll have a PR open by 28/2.