Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opt-out of/warn about replacing non-ascii characters by default #72

Open
henriquegasques opened this issue Oct 30, 2023 · 3 comments
Open
Assignees

Comments

@henriquegasques
Copy link
Collaborator

It seems that, by default, when parsing or creating an ACH, non-ascii characters are replaced with a space or removed by replacing it with an empty string. That seems a bit dangerous since it's not really clear that it's doing it, and that character might be in an important position, so simply "ignoring" it might not be what people really want. I think at least a warning should be given, but for my current case, It might be ideal to consider the file to be invalid, or maybe only the section which has the bad character.

@henriquegasques henriquegasques self-assigned this Oct 30, 2023
@henriquegasques
Copy link
Collaborator Author

Hey @jm81 and @adamdecaf, It would be interesting to hear your thoughts on this, if you have a minute. Please feel free to ignore this otherwise.

@jm81
Copy link
Collaborator

jm81 commented Oct 31, 2023

@henriquegasques To the best of my memory, the replacement with space was added as a quick fix for somebody years ago who had an issue. I vaguely remember thinking it needed a better solution, but dealing with encodings is not something I have much experience with, so I guess I just pushed off doing anything about it until I forgot about it. Your idea of a warning or considering the file invalid makes sense to me (maybe with an option to keep the current behavior).

@adamdecaf
Copy link

In the Go ach library I maintain we process the file rune by rune to handle non-ascii characters. Replacing them with blank characters doesn't seem good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants