Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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.php
as well. The author forgets that in PHP,0 !== NULL
but0 == 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: Tommy Sundstrom commentedSORRY included the full files not the patches.
Here we go again.
Comment #5
Tommy Sundstrom CreditAttribution: Tommy Sundstrom commentedand the other patch
Comment #6
jhriggs CreditAttribution: 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) CreditAttribution: commented