> I would try adding the following:
>
>   if config.db_type == 'mysql':
>     d['init_command'] = 'SET NAMES utf8'
>     d['charset'] = 'utf8'
>     d['use_unicode'] = True

Nah that doesn't work.

Here's a unicode note from the 1.2.2 release notes[1]:

"Only encode the query (convert to a string) when it is a unicode instance;
re-encoding encoded strings would break things."

This makes me think there is a problem maintaining utf8-ness somewhere.

The first error I see is when I run buildDB.py in the "build page cache"
section. I get to building the page cache for "Help/Help with Images" and
it dies:

Traceback (most recent call last):
  File "/home/.orbit/sbeards/src/sapling/Sycamore/Page.py", line 815, in
buildCache
    page.send_page(content_only=1)
  File "/home/.orbit/sbeards/src/sapling/Sycamore/Page.py", line 623, in
send_page
    self.send_page_content(Parser)
  File "/home/.orbit/sbeards/src/sapling/Sycamore/Page.py", line 676, in
send_page_content
    if cache.needsUpdate():
  File "/home/.orbit/sbeards/src/sapling/Sycamore/caching.py", line 26, in
needsUpdate
    page_cache = self.content_info()
  File "/home/.orbit/sbeards/src/sapling/Sycamore/caching.py", line 53, in
content_info
    return pageInfo(page).cached_text
  File "/home/.orbit/sbeards/src/sapling/Sycamore/caching.py", line 206,
in pageInfo
    result = page.cursor.fetchone()
  File "/home/.orbit/sbeards/src/sap/Sycamore/wikidb.py", line 155, in
fetchone
    result = fixUpStrings(result)
  File "/home/.orbit/sbeards/src/sap/Sycamore/wikidb.py", line 47, in
fixUpStrings
    return [ doFixUp(i) for i in item ]
  File "/home/.orbit/sbeards/src/sap/Sycamore/wikidb.py", line 41, in doFixUp
    return i.decode(config.db_charset)
  File "/home/sbeards/lib/python2.4/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x83 in position 31:
unexpected code byte

I think somewhere in the caching or html generation code there is a real
problem. I've tested the text file for "Help/Help with Images" and it all
decodes to unicode properly. I'll try to dig a bit deeper to find the
problem.

Scott
---------
[1]
http://sourceforge.net/project/shownotes.php?group_id=22307&release_id=491012

_______________________________________________
Sycamore-Dev mailing list
[EMAIL PROTECTED]
http://www.projectsycamore.org/
https://tools.cernio.com/mailman/listinfo/sycamore-dev

Reply via email to