Hi,

I am new to Drupal and immediately installed the Textile module, for usability and conformity to standards purpose. And It doesn't work exactly as expected.

At the first try, when I formatted the text, it worked well, including french accented characters, but the tags [textile]...[/textile] _appeared_ highlighted, and were in fact URLs to http://trollodrome.net/title/textile

It made me discover that when I type http://trollodrome.net/textile (Drupal is installed in the root of the website), it provokes nothing but a "page not found error", which is a second bug.

Finally, after trying to tweak it so that it works normally, it seems partially broken. The accented characters appear as ugly random characters that are not of any language. You will find the page here:
http://trollodrome.net/node/view/1

It remains me of the terrible amounts of corean spam I daily receive :-)

Drupal was configured to serve UTF8 characters, I found, and don't understand why because I checked the Iso-latin1 character set. I couldn't change it. I don't know where to find the responsible of this mess. May you help me?

Comments

Joachim D.’s picture

I add an information: it seems that the character entities generated by the textile formatter are mistaken. For exemple:

"Aussi étrange que cela paraisse, cette image est très exactement une métaphore de ce qui se passe sur Internet."

When there is a "Ã" and another entity after ("©" or "¨"), there should only be a "é" or a "&agrav;". I don't understand. It is the same result with different navigators...

jhriggs’s picture

The first problem ([textile] appearing as links) is due to the title module. You need to either disable title.module or rearrange the filters so that the Textile filter comes before title filter. As for the special characters, it does seem to be a latin1 vs. utf8 problem, but I am not sure what the exact problem is. I'll have to look into it.

Steven’s picture

The fix is to change the call to htmlentities() in textile to htmlspecialchars().

Anonymous’s picture

Has this problem been solved ? I tried the fix stated above with no success on CivicSpace.

Steven’s picture

Look for code designed to escape characters other than < > & and " and comment it out. It is unnecessary for UTF-8.

Tommy Sundstrom’s picture

At http://drupal.org/node/6881 it is suggested to "set the default value for options['char_encoding'] to 0 instead of 1". This worked for me.

Tommy Sundstrom’s picture

In textile.php change

$this->options['char_encoding'] = ($this->options['char_encoding'] ? $this->options['char_encoding'] : 1);

into

$this->options['char_encoding'] = ($this->options['char_encoding'] ? $this->options['char_encoding'] : 0);
mousse-man’s picture

Component: Miscellaneous » Code

The last fix solved it as long as you read the whole article, but when reading the teaser, the letters are still ugly.

mousse-man’s picture

Change

$this->options['charset'] = ($this->options['charset'] ? $this->options['charset'] : 'iso-8859-1');

to

$this->options['charset'] = ($this->options['charset'] ? $this->options['charset'] : 'utf-8');

And no more ugly characters.

pgassner’s picture

Mousse-mans hint also worked for me, even though I didn't notice it immediately. Because I first created a new story with umlauts and then fiddled around with Textile.php, I still got those scrambled characters. Don't try it that way 'round!

Instead change the settings in Textile.php as mousse-man explains first and create a new story with umlauts afterwards - good luck :)

pablobm’s picture

I just came up with a deeper explanation of the problem, I think. You can find it in a related bug (a dupe, indeed): Problems with accented characters.

jhriggs’s picture