Closed (fixed)
Project:
Textile
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Oct 2004 at 08:51 UTC
Updated:
4 Apr 2005 at 17:15 UTC
Jump to comment: Most recent file
There is a problem with accented characters when using the textile module, see http://drupal.org/node/10268 and http://drupal.org/node/6881
I belive the options['char_encoding'] should be set to 0 as default OR that a trouble shooting section should be added to the installation instructions telling about this solution.
Possibly related: option charset is set to iso-8859-1. I thougt Drupal was strictly utf-8.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Textile.php.patch | 2.87 KB | Tommy Sundstrom |
| #4 | textile.module_1.patch | 1.21 KB | Tommy Sundstrom |
| #3 | Textile.php | 145.21 KB | Tommy Sundstrom |
| #2 | textile.module | 14.96 KB | Tommy Sundstrom |
Comments
Comment #1
pablobm commentedYesterday I had a hard fight against this module due to this problem. Finally, I think I came up with the error.
Initially, it may seem the problem is the module doesn't tell to Textile to work with UTF-8 encoding, which is the one used by Drupal.
It should be fixed in the code at the end of the module, inside the DrupalTextile class. (This is because all Drupal processing is supposed to deal with UTF-8).
One way to do so would be changing the next code (from line 516):
Should be changed to this:
However, this is not enough. There is an error in the
textilephp/Textile.phpas well. The author forgets that in PHP,0 !== NULLbut0 == NULL. This happens in the next piece of code (from line 4080):That should be:
With both changes, accents should be not a problem for textile.module anymore.
Comment #2
Tommy Sundstrom commentedHere's a patch of textile.module to fix the problem with accented characters.
Use together with the patch of Textile.php
Comment #3
Tommy Sundstrom commentedHere is a patch of Textile.php to fix accented chars
Use together with the patch of textile.module
Comment #4
Tommy Sundstrom commentedSORRY included the full files not the patches.
Here we go again.
Comment #5
Tommy Sundstrom commentedand the other patch
Comment #6
jhriggs commentedThere were two things going on here. First, the module did not specify utf-8 as the charset for the Textile class. Second, there was a bug in TextilePHP that caused it to ignore false values for char_encoding. This is all addressed in the latest files in CVS. The lastest version for both 4.5 and 4.6 should work properly.
Comment #7
(not verified) commented