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

Support ISo charset names without separation between ISO and 8859 #8

Open
rsevero opened this issue Oct 24, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@rsevero
Copy link

rsevero commented Oct 24, 2023

Is your feature request related to a problem? Please describe.
Just started using this package in a personal app. I am reading enconding names from files and in these files ISO encoding names for, for example, ISO 8859-3, are ISO8859-3 and not ISO-8859-3 or ISO_8859-3 as this package expects in Charset.getByName().

Describe the solution you'd like
Please support ISO charset names also without any separators between ISO and 8859: ISO8859-3 besides ISO-889-3 and ISO_8859-3.

Describe alternatives you've considered
I am manually regexing the encoding name to check if it starts with ISO and them including a hyphen between ISO and 8859 but it's cumbersome and shouldn't be necessary.

@shirne shirne added the enhancement New feature or request label Oct 25, 2023
@shirne
Copy link
Owner

shirne commented Oct 25, 2023

you can call

Charset.register(latin2, 'iso8859-2');
Charset.register(latin3, 'iso8859-3');
// etc.

to register encoding name manually

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

No branches or pull requests

2 participants