I try use a title argument:
<!--tableofcontents title:Spis Treści;-->

But title of Table of contents is still "Table of Contents" when i replace "ś" by "s", correct title will show. But using special signs like ć, ś, ł etc. are necessary for me.

Comments

Jean-Philippe Fleury’s picture

The problem is the regex used in tableofcontents.module to parse optons:

// parse separate options
preg_match_all('/([A-z]+): ?([A-z0-9 ]+);/', $options_str[1][0], $options, PREG_PATTERN_ORDER);

[A-z0-9 ]+ doesn't match accentuated characters. We could put on the top of the script a setlocale () and then use \w on the regex, but the big problem is what parameters choose for setlocale () (we can't declare a specific language for a script used by lots of people). Is there a kind of lang variable set by Drupal?

Maybe we could use again i18n-ascii.txt to have a list of allowed characters?

Or more simple: [^;]+ and add some other forbidden characters?

AlexisWilke’s picture

Version: 6.x-2.2 » 6.x-3.x-dev
Component: Miscellaneous » Code
Assigned: Unassigned » AlexisWilke
Status: Active » Fixed

Done in 3.x-dev, Jul 5, 2009.

Of course, the title cannot include a semi-colon...

Thank you,
Alexis Wilke

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.