Special chars - mac encoding
Hi,
Albums with special characters (e.g. "ü") are not working on my linux server when I generate the gallery with sigal on my mac (10.10.1). Both the linux server and the mac use locale "de_AT.UTF-8".
In the "index.html" file I found this:
<a href="Mu%CC%88nchen/"> for "München" which will not work in the browser. When building the gallery on linux, the encoding does work: <a href="M%C3%BCnchen/"> Do you have any idea what might have happened here?
P.S.: thank you for the great new version of sigal!
Hi @sebiii , Sorry I don't have any idea of what is happening here. The encoding part is done by jinja I guess, so it would need some investigation ...
Maybe thats worth to try out: http://thegreyblog.blogspot.de/2012/02/fixing-mac-os-x-lions-ssh-utf-8-issues.html The Mac ssh seems to provide not completey right locales, especially for LC_CTYPE. You can compare this by calling "locale". However, in the sigal config you can define also the locale.
I have done some investigation and the reason for my issue is that HFS+ filesystems store filenames in a specific ("fully decomposed") form.
Basically this means that on Mac OS X with HFS+ filesystem, a "ü" character in a filename/foldername will be saved as "u¨". (Still UTF-8) You will also get this decomposed form when you read filenames/foldernames from the filesystems. These decomposed names will work on mac os x but need to be transformed to the composed form (e.g. "ü") again to work on a linux system.
Unfortunately, I have no idea how to fix this. For now, I have a shell script that replaces the characters in the html files.
Further details can be found here: http://stackoverflow.com/questions/6153345/different-utf8-encoding-in-filenames-os-x http://apple.stackexchange.com/questions/10476/how-to-enter-special-characters-so-that-bash-terminal-understands-them