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

build.sh: transliterate categories #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

backlin
Copy link

@backlin backlin commented Aug 27, 2023

_templates/technical/faux_urlencode.awk can't handle multibyte characters, such as {å, ä, ö}:

echo 'abzåäöxy' | awk -f "_templates/technical/faux_urlencode.awk"
awk: towc: multibyte conversion failure on: '�

 input record number 1, file
 source line number 18

I suggest to avoid this problem by ascii conversion with transliteration, where non-ascii chars are converted to their closest ascii representation.

Example:

echo 'abzåäöxy' | iconv -f UTF-8 -t ascii//TRANSLIT | awk -f "_templates/technical/faux_urlencode.awk"
abza22a22oxy

It's not ideal to convert ä to 2a since the URLs look a little awkward, but it fixes the build and the html looks fine.

@backlin
Copy link
Author

backlin commented Aug 27, 2023

Opening this because {å, ä, æ, ö, ø} are common characters in the Nordic languages, so the category system must support them to work in those languages.

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

Successfully merging this pull request may close these issues.

1 participant