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

German umlaut not correct replaced... #123

Closed
Dexus opened this issue Sep 1, 2018 · 3 comments
Closed

German umlaut not correct replaced... #123

Dexus opened this issue Sep 1, 2018 · 3 comments
Assignees

Comments

@Dexus
Copy link

Dexus commented Sep 1, 2018

i have "datenschurtzerklärung" as slug, but it will not be "datenschutzerklaerung" it gets "datenschutzerla_rung" with option {lang:'de',seperator:'_'}

Additional: Running on MacOS High Sierra and Linux Ubuntu 18.04 same problem

@kwiatkk1
Copy link
Contributor

Hi, the reason is that you can represent ä in many ways in unicode string (ä or a\u0308). If you use latter, a combining character (https://www.fileformat.info/info/unicode/char/0308/index.htm), then transliteration breaks, as it process string char by char.

The solution is to use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize before transliteration. See #126 that contains proposed solution.

@Dexus
Copy link
Author

Dexus commented Oct 25, 2018

Thanks, that will help.

@Dexus Dexus closed this as completed Oct 25, 2018
@Dexus
Copy link
Author

Dexus commented Oct 25, 2018

BTW: https://github.com/walling/unorm would help for 0.10.x

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