[nem-en] Language support and BOM

Michal Moskal michal.moskal at gmail.com
Mon Jan 29 23:38:02 CET 2007


On 1/29/07, vc <vc at rsdn.ru> wrote:
> > It's not that simple. cp-1251 files do not have any BOM, so we cannot
> > detect it. We would need to rely on statistical-analysis to
> > auto-detect encoding, or just use current machine encoding, which is
> > IMHO the worst way.
>
> In my option auto-detect encoding is shamanism.
> If exists BOM treat as utf. Otherwise treat as current encoding.
>
> If you against use current encoding we should allow *only UTF with BOM*. All
> other encodings compiler must treat as error. It does prevent user from
> pain.

With your solution the pain occurs when OTHER developer tries to use
that file on a different machine.

With the current solution the pain occurs when you save a file in
cp-whatever (which we consider pure evil) and tries to compile it -
the compiler chokes on it (at least it should) and the user is forced
to convert the encoding to utf8 (with or without BOM). Then the user
if free from pain.

-- 
   Michał


More information about the devel-en mailing list