Skip to content

build.sh: transliterate categories#30

Open
backlin wants to merge 1 commit intodoersino:mainfrom
backlin:translit
Open

build.sh: transliterate categories#30
backlin wants to merge 1 commit intodoersino:mainfrom
backlin:translit

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