[imp] Accents in spellcheck with aspell (replay)

Jan Schneider jan at horde.org
Thu Nov 9 07:50:34 PST 2006


Zitat von Fabio Lourenco Gomes <flgomes at fazenda.sp.gov.br>:

> ----- Mensagem de jan at horde.org ---------
>> Zitat von Fabio Lourenco Gomes <flgomes at fazenda.sp.gov.br>:
>>
>>> Examining the code I noticed that in <Horde>/lib/Horde/NLS.php,   
>>> line 225, Horde enforces the use of UTF-8 charset for browsers
> that
>>> supports it. That piece of code wasn't present in the previous   
>>> version I was using (3.0.9).
>>>
>>> Doing that change to UTF-8 breaks my dictionary that uses   
>>> ISO-8859-1 charset. That code wouldn't be that bad if, as it   
>>> happens with all modules, the dictionary's words were converted
> to
>>> UTF-8 too.
>>>
>>> To change that behaviour I just commented lines 255 to 229 of
> NLS.php.
>>
>> This is obviously not the correct solution,
>
>   Yes, I know it isn't.
>
>> but if you can explain
>> exactly where which charset is used for which functionality
> (system,
>> backends, browser, spell checker), we might be able to find a
> proper
>> fix. But I lost you completely on your system using different
> charsets.
>>
>
>   My system is entirely configured to use ISO-8859-1. The problem is  
> the Firefox supports UTF-8, thus allowing horde to switch to UTF-8.

This is fine.

>   There it goes:
>
>   * Browser (Firefox 1.5): default charset ISO-8859-1, but supports UTF-8;
>   * Operating System (Fedora 4): charset ISO-8859-1, language pt_BR;

Doesn't matter.

>   * PHP 5.0.4: default charset ISO-8859-1;

Doesn't matter.

>   * Apache 2.0.54: default charset ISO-8859-1;

Doesn't matter.

>   * horde/config/nls.php:
>     $nls['defaults']['language'] = 'pt_BR';
>     $nls['spelling']['pt_BR'] = '-d pt_br';
>   * Spellchecker: aspell-0.50.5-6, aspell-pt_BR-2.4-14, dictionary  
> charset: ISO-8859-1.
>
>   Horde converts all charsets in the pages to UTF-8 if my browser  
> supports it, except the words from the dictionary used by the spell  
> checker in compose.php.

This is the default setup for 95% of all Horde installations and the  
spell checker works fine for most of them.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the imp mailing list