2011-10-31

Struggling with an inexplicable issue

I was seeing some odd behavior in 1.19 alpha, so I decided to focus my attention on 1.18 instead, thereby increasing my confidence that my work would be against a known-good version of MediaWiki. Like 1.19 alpha, 1.18 is mostly working -- but here's a head scratcher. I'm getting strange rendering of some characters, such as the hyphen (-). Here's a page as seen in MediaWiki 1.18 on Windows 7, SQL Server 2008 R2, and IIS 7.0. Notice the messed up "Model-View-Controller" in the table of contents. The page was copied over from the English Wikipedia. Here's what's very strange. The SQL database has hyphens in it, nothing remarkable. When I select the "Edit" tab, I can see the hyphens in the text box, so I press preview. The result looks fine! The table of contents now shows "Model-View-Controller". Why is the rendering different between the preview and the rendered page? Except for the database access, the code is pretty much identical between the official 1.18 code and my variant.

1 comment:

DJ said...

This issue turns out to have been caused by using type CHAR rather than NVARCHAR within the wiki. While columns of type CHAR worked fine with the older ADODB SQL Server connection, they do not work with the SQL Server PDO connection. The wiki creation DDL has been updated to use columns of type NVARCHAR throughout.