bugtexinfo - GNU documentation system - Bugs: bug #45859, Problems viewing Latin-1 Info file...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #45859: Problems viewing Latin-1 Info file when Latin-1 locale is not installed

Submitted by:  Gavin D. Smith <gavin>
Submitted on:  Tue 01 Sep 2015 08:25:42 PM UTC  
 
Category: NoneRelease: 
Priority: 5 - NormalSeverity: 3 - Normal
Item Group: NonePrivacy: Public
Open/Closed: ClosedAssigned to: None
Status: Wont Fix

Tue 01 Sep 2015 09:44:00 PM UTC, comment #2:

>my view, with which you may disagree, is: do nothing.


As far as I am concerned, that's probably what will happen. That's mainly why I created this bug report - because I didn't plan on doing anything about it in the foreseeable future, and the problem would get forgotten about otherwise.

Gavin D. Smith <gavin>
Project Administrator
Tue 01 Sep 2015 09:22:06 PM UTC, comment #1:

my view, with which you may disagree, is: do nothing.

i don't understand why it's info's place to solve every locale problem in the world. every single program that displays text from files has the same basic issue, as far as i can see. to me this means it has to be solved at a higher level.

surely there are more useful improvements to make with (tex)info than to spend time worrying about, let alone doing a substantial rewrite for, a case of an 8-bit info file (which shouldn't be created in the first place) being read on a system without 8-bit locales (which is utterly inane IMHO).

by the way, i ran across a program called "luit" which, if i understood it right, converts 8-bit encodings to utf-8 on the fly somehow. i think it might be for precisely this case, but i admit i'm not sure.

Karl Berry <karl>
Project Administrator
Tue 01 Sep 2015 08:25:42 PM UTC, original submission:

I tried viewing a Latin-1 Info file on a remote host via SSH, in a Latin-1 terminal emulator, but because the remote host didn't have a Latin-1 locale installed, it wasn't possible to view it properly. This wasn't a problem with info 5.2 which just sent through the bytes in the file directly to the terminal.

(The file happened to be gpcs-de-4.1.info, the GNU Pascal Coding Standards in German.)

I'm not sure exactly how to proceed with this. Blame it on the locales being missing, and leave it unfixed? Or adapt somehow?

One thought is to heed an environment variable, possibly INFO_CTYPE, or maybe even the pre-existing LC_CTYPE, which would specify what character encoding the user wants the output in, the locale settings notwithstanding.

The iconv function appears to support more encodings than are available in locales. So with the problem I had, using the "C" locale allowed a conversion from Latin-1 to ASCII (via UTF-8). To solve this, the iconv function would have to be used instead of functions like mbrtowc, which depend on the current locale settings. If we didn't have the wchar_t values of characters, then we couldn't use functions like iswprint or wcwidth (which only really matters for Info files in some Asian languages --- I guess they wouldn't be in Latin-1 in the first place). I guess what could be done is first convert with iconv to the current locale's encoding, use iswprint etc., and for output, convert the character on to the encoding that the user specified --- that's more complicated, though. So using iconv to iterate over characters in a different encoding from that in the current locale may be possible, maybe as a fall-back if the available locales are deficient, and possibly with slight reduction in functionality.

I would be careful about possible solutions that just send on bytes to the terminal with no conversion. I haven't tracked down which ones they are, but I know there are some bytes in the 0x80-0x9f region (the "C1" set) which can ruin the display (even running "reset" didn't seem to help), for example in a UTF-8 dir entry in a merged dir file.

Gavin D. Smith <gavin>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by karl (Posted a comment)
  • -unavailable- added by gavin (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 10 Sep 2015 10:15:16 AM UTCgavinOpen/ClosedOpen=>Closed
      StatusNone=>Wont Fix

    Back to the top


    Powered by Savane 3.1-cleanup1