Re: Displaying characters in user's locale

2014-02-06 Thread Gavin Smith
On Thu, Feb 6, 2014 at 6:44 PM, Karl Berry wrote: > Hi Gavin, > > that is, not output encoding - > > Good. > > I would think that we should leave files as they are if we don't > know their encoding - that way we don't risk breaking something that > works already. > > Right. So wha

Re: Displaying characters in user's locale

2014-02-06 Thread Karl Berry
Hi Gavin, that is, not output encoding - Good. I would think that we should leave files as they are if we don't know their encoding - that way we don't risk breaking something that works already. Right. So what do you mean by "the default file encoding is set to UTF-8"? What d

Re: Displaying characters in user's locale

2014-02-03 Thread Gavin Smith
On Sun, Feb 2, 2014 at 10:16 PM, Karl Berry wrote: > > * Default encoding is set as UTF-8 - decide whether this is desired > All I can think of to base the default on the current locale, because > that's the only information we've got about what the user desires. > E.g., if the locale is "C" (

Re: Displaying characters in user's locale

2014-02-02 Thread Andreas Schwab
k...@freefriends.org (Karl Berry) writes: > All I can think of to base the default on the current locale, because > that's the only information we've got about what the user desires. > E.g., if the locale is "C" (or, equivalently, "POSIX", of course), the > target should be plain 7-bit ASCII. If

Re: Displaying characters in user's locale

2014-02-02 Thread Karl Berry
To work the iconv module needs to be added from gnulib. I'll do that after the paperwork has gone through. (And after Sergey has had a chance to review in detail.) * Default encoding is set as UTF-8 - decide whether this is desired That would defeat the whole purpose, it seems to me. Ce

Re: Displaying characters in user's locale

2014-02-02 Thread Karl Berry
-@item ISO-8859-2 @itemx ISO-8859-1 @itemx ISO-8859-15 +@item ISO-8859-2 Yes, thanks Reinhard. I will fix (modulo itemx/item :). k

Re: Displaying characters in user's locale

2014-02-02 Thread Eli Zaretskii
> From: Reinhard Kotucha > Date: Sun, 2 Feb 2014 19:32:24 +0100 > Cc: Eli Zaretskii , > bug-texinfo@gnu.org, > Karl Berry > > -@item ISO-8859-2 > @itemx ISO-8859-1 > @itemx ISO-8859-15 > +@item ISO-8859-2 This will cause makeinfo to barf: @item should be the 1st item in the list, all

Re: Displaying characters in user's locale

2014-02-02 Thread Reinhard Kotucha
On 2014-02-01 at 15:21:51 +, Gavin Smith wrote: > 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). Hi, a bit off-topic maybe, but there is a little bug in the section

Re: Displaying characters in user's locale

2014-02-02 Thread Gavin Smith
On Sat, Feb 1, 2014 at 8:11 AM, Eli Zaretskii wrote: >> Date: Fri, 31 Jan 2014 21:33:39 + >> From: Gavin Smith >> Cc: Karl Berry , bug-texinfo@gnu.org >> >> I've attached a patch which uses iconv as you suggested. I've tested >> it with the two files attached under both utf-8 and iso8859-1 lo

Re: Displaying characters in user's locale

2014-02-01 Thread Per Bothner
On 02/01/2014 09:32 AM, Eli Zaretskii wrote: What if a sequence of bytes intended to encode ISO-8859-1 characters happens to correctly represent UTF-8 characters? This cannot happen, by virtue of the UTF-8 definition and the fact that ISO-8859-1 is a single-byte encoding. Except for ASCII cha

Re: Displaying characters in user's locale

2014-02-01 Thread Eli Zaretskii
> Date: Sat, 01 Feb 2014 19:31:14 +0200 > From: Eli Zaretskii > Cc: bug-texinfo@gnu.org, k...@freefriends.org > > > Date: Sat, 1 Feb 2014 17:07:16 + > > From: Gavin Smith > > Cc: Karl Berry , bug-texinfo@gnu.org > > > > On Sat, Feb 1, 2014 at 5:00 PM, Eli Zaretskii wrote: > > >> What if a

Re: Displaying characters in user's locale

2014-02-01 Thread Eli Zaretskii
> Date: Sat, 1 Feb 2014 17:07:16 + > From: Gavin Smith > Cc: Karl Berry , bug-texinfo@gnu.org > > On Sat, Feb 1, 2014 at 5:00 PM, Eli Zaretskii wrote: > >> What if a file is not in UTF-8 and doesn't specify its encoding? Is it > >> likely, for example, that there are many files in ISO-8859-1

Re: Displaying characters in user's locale

2014-02-01 Thread Gavin Smith
On Sat, Feb 1, 2014 at 5:00 PM, Eli Zaretskii wrote: >> What if a file is not in UTF-8 and doesn't specify its encoding? Is it >> likely, for example, that there are many files in ISO-8859-1 which >> don't specify their encoding? > > That could happen, yes. But I don't see any bad outcome for tha

Re: Displaying characters in user's locale

2014-02-01 Thread Eli Zaretskii
> Date: Sat, 1 Feb 2014 16:34:19 + > From: Gavin Smith > Cc: Karl Berry , bug-texinfo@gnu.org > > On Sat, Feb 1, 2014 at 3:50 PM, Eli Zaretskii wrote: > >> This depends on what files are out there with no encoding specified. > >> Do you know how long makeinfo has output an encoding section?

Re: Displaying characters in user's locale

2014-02-01 Thread Gavin Smith
On Sat, Feb 1, 2014 at 3:50 PM, Eli Zaretskii wrote: >> 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

Re: Displaying characters in user's locale

2014-02-01 Thread Gavin Smith
On Sat, Feb 1, 2014 at 8:11 AM, Eli Zaretskii wrote: > First, I think a configure time test for libiconv availability should > be added, and the code that uses libiconv should be conditioned on > HAVE_LIBICONV or some such, computed by that test. > I've managed to add the iconv module from gnulib

Re: Displaying characters in user's locale

2014-02-01 Thread Eli Zaretskii
> Date: Sat, 1 Feb 2014 15:21:51 + > From: Gavin Smith > Cc: Karl Berry , bug-texinfo@gnu.org > > > 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 t

Re: Displaying characters in user's locale

2014-02-01 Thread Gavin Smith
Thanks for the feedback. I'll work on these suggestions. Some comments - On Sat, Feb 1, 2014 at 8:11 AM, Eli Zaretskii wrote: >> +/* Look for local variables section in FB and set encoding */ >> +static void >> +set_file_lc_ctype (FILE_BUFFER *fb) > > I think this function should return UTF-8 if

Re: Displaying characters in user's locale

2014-02-01 Thread Eli Zaretskii
> Date: Fri, 31 Jan 2014 21:33:39 + > From: Gavin Smith > Cc: Karl Berry , bug-texinfo@gnu.org > > I've attached a patch which uses iconv as you suggested. I've tested > it with the two files attached under both utf-8 and iso8859-1 locales. > (I did this by, e.g. running "LANG=en_US.UTF8" to

Re: Displaying characters in user's locale

2014-01-31 Thread Gavin Smith
On Fri, Jan 31, 2014 at 8:01 AM, Eli Zaretskii wrote: > > It is true that characters which cannot be encoded in the terminal's > encoding should be replaced with something that still leaves the text > legible. However, many characters _can_ be encoded, and Info should > use libiconv for those. M