aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-07-10 17:08:02 -0400
committerJoey Hess <joey@kitenet.net>2013-07-10 17:08:02 -0400
commitd932d5ab00885a9f7bab7644d75a38ad9a4dc48b (patch)
treee8d780c0925b3ec4d31a3f8f77afe20276517409
parentacb07ef4164643ac0dac28aab2ceae24510e5641 (diff)
parentc870043c97b6daa138df4d763d872c94a41e9d20 (diff)
downloadikiwiki-d932d5ab00885a9f7bab7644d75a38ad9a4dc48b.tar
ikiwiki-d932d5ab00885a9f7bab7644d75a38ad9a4dc48b.tar.gz
Merge branch 'master' of ssh://git.ikiwiki.info
-rw-r--r--doc/bugs/proxy.py_utf8_troubles.mdwn33
-rw-r--r--doc/ikiwikiusers.mdwn2
2 files changed, 34 insertions, 1 deletions
diff --git a/doc/bugs/proxy.py_utf8_troubles.mdwn b/doc/bugs/proxy.py_utf8_troubles.mdwn
new file mode 100644
index 000000000..a4e848102
--- /dev/null
+++ b/doc/bugs/proxy.py_utf8_troubles.mdwn
@@ -0,0 +1,33 @@
+when writing an external plugin using `proxy.py`, the getstate and setstate
+functions don't accept unicode data:
+
+ uncaught exception: 'ascii' codec can't encode character u'\xe4' in position 25: ordinal not in range(128)
+ Traceback (most recent call last):
+ File "proxy.py", line 309, in run
+ self._in_fd, self._out_fd)
+ File "proxy.py", line 192, in handle_rpc
+ ret = self._dispatcher.dispatch(method, params)
+ File "proxy.py", line 84, in dispatch
+ return self._dispatch(method, params)
+ File "/usr/lib/python2.7/SimpleXMLRPCServer.py", line 420, in _dispatch
+ return func(*params)
+ File "proxy.py", line 251, in hook_proxy
+ ret = function(self, *args)
+ File "/home/chrysn/git/ikiwiki-plugins//plugins/my_plugin", line 49, in data2html
+ proxy.setstate(kwargs['page'], 'meta', 'title', unicode_containing_umlauts)
+ File "proxy.py", line 291, in setstate
+ return self.rpc('setstate', page, id, key, value)
+ File "proxy.py", line 233, in rpc
+ *args, **kwargs)
+ File "proxy.py", line 178, in send_rpc
+ cmd, data))
+ UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 25: ordinal not in range(128)
+
+the culprit is the last `_debug_fn` invocation in `send_rpc` (line 178), where
+unicode data is format-fed into a string. while this could be circumvented by
+making the formatting string a unicode string, that would cause trouble with
+python3 and we'd just move the problem to the stderr writing later on; instead,
+"`cmd, data))`" should become "`cmd, repr(data)))`" and everything is fine.
+debug output doesn't look that pretty any more, but is safe.
+
+--[[chrysn]]
diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn
index ecba46e03..eda6e3ab0 100644
--- a/doc/ikiwikiusers.mdwn
+++ b/doc/ikiwikiusers.mdwn
@@ -88,7 +88,7 @@ Projects & Organizations
* [The RS-232 Club](http://rs232club.org)
* [FusionInventory project](http://www.fusioninventory.org)
* FabLab Deventer i.o.
-* [Börn og tónlist](http://bornogtonlist.net/) - an Icelandic open-content site, primarily for kindergarten teachers, about music and music-related activites with children. Migrated from MediaWiki to IkiWiki in June 2013. Heavily changed appearance with only minimal changes to page.tmpl.
+* [Börn og tónlist](http://bornogtonlist.net/) - an Icelandic open-content site, primarily for kindergarten teachers, about music and music-related activites with children. Migrated from MediaWiki to IkiWiki in June 2013. Heavily changed appearance with only minimal changes to page.tmpl. Also its sister site [Leikur að bókum](http://leikuradbokum.net), about children's books in a kindergarten/pre-school context.
* [Réseaulibre.ca](http://wiki.reseaulibre.ca) - a mesh project in Montréal, most data is stored in the wiki, including IP address allocation and geographic data. Features map ([[plugins/osm]]) integration.
* [Foufem](http://foufem.orangeseeds.org/) - Foufem, a feminist hackerspace