sigal icon indicating copy to clipboard operation
sigal copied to clipboard

Special chars - mac encoding

Open sebiii opened this issue 10 years ago • 3 comments

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!

sebiii avatar Jan 07 '15 01:01 sebiii

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 ...

saimn avatar Jan 11 '15 22:01 saimn

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.

ThomasRgbg avatar Feb 14 '15 20:02 ThomasRgbg

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

sebiii avatar Feb 14 '15 21:02 sebiii