scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 90 forks source link

Chinese characters in page title #75

Closed workingenius closed 8 years ago

workingenius commented 8 years ago

hello, I'm a programmer from China and we're looking for a open-source wiki for our team, so I searched and came to realms-wiki. I found that pages with Chinese characters in title will not found in index list. I'm not sure if it is successfully created. I hope realms will support it someday, as reading an searching in everyone's native language would be a great convenience. thanks.

scragg0x commented 8 years ago

The page name will correspond with a URL and file name. I don't know for sure if Chinese characters in the URL will play nice with modern browsers and with file names on the file system. With that being said, I don't know of a solution if they don't work an either instance.

larsimmisch commented 8 years ago

I've got the same problem with simple Umlauts ä, ö, ü, etc.

I suspect the canonical form is overly restrictive. File names really should be in UTF-8, and if they aren't, I would regard that as an installation problem.

scragg0x commented 8 years ago

You are correct. I have read that UTF-8 is fine for linux and that is all I will support ATM. As for URLs, it should be ok, there might be some encoding/decoding to do etc. I will address this issue when I get a moment and of course pull requests are welcome.

larsimmisch commented 8 years ago

I'll look at it (fighting with click right now).

OS X should also be fine, with the one caveat that OS X's HFS+ filesystem requires that all filenames be stored in the UTF-8 representation of their fully decomposed form (see http://stackoverflow.com/questions/6153345/different-utf8-encoding-in-filenames-os-x).

But that should not matter - the filename encoding is still UTF-8 on OS X

scragg0x commented 8 years ago

added support here e3508e365f72a12608badcae997862d43bbad0f8