/instiki/svn

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/instiki/svn/

Viewing all changes in revision 520.

  • Committer: Jacques Distler
  • Date: 2010-01-04 12:41:04 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20100104124104-p8lvyyyp8ezupj4y
Ruby 1.9 + MySQL Hack

The default encoding in MySQL is latin1. Ruby 1.9
is a stickler about the encoding of a sequence of bytes.
In this case, a utf8 page name stored in the database comes
back as "ASCII-8BIT" (ie, binary). Coerce that back to utf8.

This doesn't affect SQLite3, and it doesn't affect Ruby 1.8.
It doesn't even affect MySQL databases with "utf8" encoding
(though that has other issues, since MySQL's utf8 support is
broken).
There are probably other, similar problems lurking.

expand all expand all

Show diffs side-by-side

added added

removed removed