[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Displaying characters in user's locale
From: |
Eli Zaretskii |
Subject: |
Re: Displaying characters in user's locale |
Date: |
Sat, 01 Feb 2014 17:50:50 +0200 |
> Date: Sat, 1 Feb 2014 15:21:51 +0000
> From: Gavin Smith <address@hidden>
> Cc: Karl Berry <address@hidden>, address@hidden
>
> > I think this function should return UTF-8 if it doesn't find any
> > coding: cookies in the file. UTF-8 is probably the best default
> > nowadays.
> >
>
> This depends on what files are out there with no encoding specified.
> Do you know how long makeinfo has output an encoding section? Is it
> still possible today that makeinfo could output a UTF-8 file with no
> encoding specified?
It could be, with makeinfo 4.13, I think.
In any case, UTF-8 covers ASCII, so I think it is safe these days.
> >> + void (*degrade_funcs[5])(char **, size_t *,
> >> + char **, size_t *) = {
> >> + degrade_dummy, degrade_utf8, degrade_dummy,
> >> + degrade_dummy, degrade_dummy };
> >
> > Why do we need any degrade_* functions except degrade_utf8? Can you
> > tell what possible features can benefit from this?
> We rely on iconv to find an exact conversion between characters.
> Failing that we look for an ASCII replacement.
Yes, I understand, but why do we need a separate function for each
encoding? Isn't degrade_utf8 capable of covering all of them?
> > One of the disadvantages of those degrade_* functions is that you must
> > match each encoding with a functions, and there are an awful lot of
> > possible encodings out there.
> >
> I've listed all the ones listed in the texinfo manual
> (http://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040documentencoding.html#g_t_0040documentencoding).
> Hopefully in the future more won't be added and everyone will use
> UTF-8 instead.
I don't think we can forbid people from using their encoding, even if
it is not in that list.
> Note also that some files are split - it should only convert each
> subfile as they are loaded.
Nowadays, splitting becomes a rare phenomenon, as memory is no longer
at premium as it was before. E.g., Emacs ships all its manuals
unsplit.
Thanks.
- Re: Displaying characters in user's locale, Eli Zaretskii, 2014/02/01
- Re: Displaying characters in user's locale, Gavin Smith, 2014/02/01
- Re: Displaying characters in user's locale,
Eli Zaretskii <=
- Re: Displaying characters in user's locale, Gavin Smith, 2014/02/01
- Re: Displaying characters in user's locale, Eli Zaretskii, 2014/02/01
- Re: Displaying characters in user's locale, Gavin Smith, 2014/02/01
- Re: Displaying characters in user's locale, Eli Zaretskii, 2014/02/01
- Re: Displaying characters in user's locale, Eli Zaretskii, 2014/02/01
- Re: Displaying characters in user's locale, Per Bothner, 2014/02/01
Re: Displaying characters in user's locale, Reinhard Kotucha, 2014/02/02
Re: Displaying characters in user's locale, Gavin Smith, 2014/02/01