Tetra WebBBS Configuration

%SFU_char_mapping

%SFU_char_mapping is a hash variable which allows boardadmins to define rules for substitution of certain local characters to ASCII characters. That's usefull for boards running in languages other than English where special characters are used which are not allowed in URLs.
%SFU_char_mapping takes effect ONLY, if $SFU_subject is enabled!

New in 6.10

Example mapping for special characters used in German:

%SFU_char_mapping = (
          'ä'    => 'ae',
          'ö'    => 'oe',
          'ü'    => 'ue',
          'ß'    => 'ss',
          );

Please note:
Depending on the locales of your server it might be sufficient to define a mapping only for lower case letters. Other servers may require a mapping for upper and lower case characters. Check this out on your server or define a mapping for both, upper and lower case letters.

For advanced users:
Of course it's possible to map several characters to one substitute character in one chunk.
This line is an example of how to map the the characters 'a' and 'b' to the substitute 'c' with a one-line mapping. (Of course it's a useless mapping, but should be understandable to everybody)

  '[ab]'  => 'c',

The key to a 'multiple character mapping' is wrapping in square brackets.

For Gurus:
If you know how Perl regular expressions work then you may perform any mapping required. The RegEx used for each individual mapping is this one:

    my @SFU_cars = keys %{ $cfg->{'SFU_char_mapping'} };
    for (@SFU_cars) {
        $sbj =~ s/$_/$cfg->{'SFU_char_mapping'}->{$_}/gi;
    }

If you have a special problem mapping characters please ask on support board.