Re: ErrorState structure question

From: Allen Wittenauer <>
Date: Mon, 24 Dec 2001 12:10:27 -0800

On Monday, December 24, 2001, at 11:33 AM, Henrik Nordstrom wrote:

> On Monday 24 December 2001 17.18, Allen Wittenauer wrote:
>> I plan on adding charset support either today or maybe after Xmas,
>> since
>> the Russian and Chinese error files pretty much require it. So far,
>> the
>> changes are fairly isolated to errorpage.c, but it does require that
>> the
>> language directory get rewritten to match the country codes (English
>> becomes en, French becomes fr, etc). I suppose it would probably be
>> better to have a language and character set translation table in the
>> squid.conf. Thoughts?
> The best is probably a separate translation table somehow. Quite likely
> via
> the error_dir directive.

I was thinking of changing how error_directory worked entirely:

#error_directory <directory in error_dir> <langs> <charsets>
error_directory /opt/squid/share/errors/English en,en-*,* utf-8,iso-8859-1,
error_directory /opt/squid/share/errors/Russian-1251 ru,ru-* windows-1251
error_directory /opt/squid/share/errors/Russion-koi8-r ru,ru-* koi8-r
error_directory /opt/squid/share/errors/Simplify_Chinese zh,zh-* gb2312
error_directory /opt/squid/share/errors/Traditional_Chinese zh,zh-*

The error_directory that matches all languages(*) and all charsets(*)
would be the "fallback" language.

> Note: Starting with Squid-2.5 all languages get installed by default,
> with
> error_dir defaulting to the selected compiletime default language.


I've been coding against squid-head-200112230001 . One of the first
things to get changed was how the default language is handled. :)
Compiletime still works, but I added a squid.conf directive. With an
xlate table, that directive would go away as should the compile time,
I'd think.

Received on Mon Dec 24 2001 - 18:51:21 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:41 MST