* Rebuilding on upgrade to this version is recommended.
[ikiwiki] / doc / todo / utf8.mdwn
1 ikiwiki should support utf-8 pages, both input and output. To test, here's a
2 utf-8 smiley:
3
4 # ☺
5
6 Currently ikiwiki is belived to be utf-8 clean itself; it tells perl to use
7 binmode when reading possibly binary files (such as images) and it uses
8 utf-8 compatable regexps etc.
9
10 utf-8 IO is not enabled by default though. While you can probably embed
11 utf-8 in pages anyway, ikiwiki will not treat it right in the cases where
12 it deals with things on a per-character basis (mostly when escaping and
13 de-escaping special characters in filenames).
14
15 To enable utf-8, edit ikiwiki and add -CSD to the perl hashbang line.
16 (This should probably be configurable via a --utf8 or better --encoding=
17 switch.)
18
19 The following problems have been observed when running ikiwiki this way:
20
21 * If invalid utf-8 creeps into a file, ikiwiki will crash rendering it as
22   follows:
23
24         Malformed UTF-8 character (unexpected continuation byte 0x97, with no preceding start byte) in substitution iterator at /usr/bin/markdown line 1317.
25         Malformed UTF-8 character (fatal) at /usr/bin/markdown line 1317.
26
27   In this example, a literal 0x97 character had gotten into a markdown
28   file.