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

Problem: slugs with non-ascii chars are ill-formed #1921

Open
miceno opened this issue Feb 7, 2025 · 0 comments · May be fixed by #1922
Open

Problem: slugs with non-ascii chars are ill-formed #1921

miceno opened this issue Feb 7, 2025 · 0 comments · May be fixed by #1922
Labels
Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result.

Comments

@miceno
Copy link

miceno commented Feb 7, 2025

Current Behavior

Steps to reproduce the behavior

  1. Create a taxonomy term with the following text "España está en Europa".
  2. The slug will be "espa-na-est-a-en-europa".

Expected Behavior

  1. Create a taxonomy term with the following text "España".
  2. The slug will be "espana-esta-en-europa".

Possible Solution

As of now, the transliteration is using iconv module, that converts the "ñ" to "~n". In fact it is converting special chars like á to 'a and thus, it converts ' to -.

Using a php module like the ´intl` module, we can convert it avoiding the additional char.

intl module is a module commonly available on Linux distributions.

Context and Notes

I can prepare a PR myself about this issue. I have already tested it on my local against the latest qa branch.

Version used

AtoM 2.9.0 - 193

Operating System and version

Docker compose provided from github

Default installation culture

en, es, ca

PHP version

php 7.4

Contact details

[email protected]

@miceno miceno added the Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result. label Feb 7, 2025
@miceno miceno changed the title Problem: International slugs are illed formed Problem: slugs with non-ascii chars are ill-formed Feb 7, 2025
@miceno miceno linked a pull request Feb 7, 2025 that will close this issue
@anvit anvit linked a pull request Feb 18, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant