Bug 88736 - lack of 8-bit ascii support
lack of 8-bit ascii support
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gnome-terminal (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Havoc Pennington
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-12 14:43 EDT by Michael Soulier
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version: 9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-12 15:34:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
xml file containing 8-bit ascii (1.52 KB, text/plain)
2003-04-12 15:17 EDT, Michael Soulier
no flags Details

  None (edit)
Description Michael Soulier 2003-04-12 14:43:28 EDT
Description of problem:
Trying to view an 8-bit ascii file (french text) in Vim in gnome-terminal, the
french symbols are displayed as either '?', or not at all. This works fine in
xterm, with no modifications. 


Version-Release number of selected component (if applicable):
gnome-terminal-2.0.1-5


How reproducible:
Open a file with 8-bit ascii, using vim in terminal mode.

Additional info:
I will attach an appropriate file.
Comment 1 Michael Soulier 2003-04-12 15:17:36 EDT
Created attachment 91101 [details]
xml file containing 8-bit ascii
Comment 2 Havoc Pennington 2003-04-12 15:34:33 EDT
There's no such thing as "8-bit ascii" - ascii is 7-bit. 
Your file is in Latin-1.

To view Latin-1 in Red Hat Linux 8, you have to run the terminal in 
a Latin-1 locale. LANG=fr_FR.ISO88591 or something along those lines.

In Red Hat Linux 9, the terminal has a menu called Encoding where you 
can select Latin-1 regardless of your locale.

Alternatively, use the "iconv" command to convert your file to UTF-8.
Comment 3 Michael Soulier 2003-04-13 13:53:47 EDT
Put 8-bit ascii in google, and perform a search. I think you'll find the term is
heavily used. You're arguing semantics.

I just tried "LANG=fr_FR.ISO88591 vim <filename>". That did not fix the problem.

Also, please explain why xterm does not have these difficulties. Does it just
support these character sets "out of the box", as it were? I had no such
difficulties with gnome-terminal under RedHat 7.3.
Comment 4 Havoc Pennington 2003-04-13 19:56:49 EDT
I'm not arguing semantics, I'm explaining how it works.

"LANG=fr_FR.ISO88591 vim <filename>" doesn't help, because the issue 
is with the terminal expecting UTF-8 output. Putting vim in a Latin-1 locale 
isn't going to correct that.

To run the terminal in a Latin-1 locale, you would do something like:
"LANG=fr_FR.ISO8859-1 gnome-terminal --disable-factory"

The reason 7.3 is different is that 7.3 did not default to UTF-8 locales.

In any case, the problem is simple; you have to tell the terminal what encoding 
the stuff inside it will be in. In RHL 8, that encoding is the locale encoding;
in RHL 9, that encoding is the locale encoding by default but there's a 
menu to override it.

Alternatively, you can re-encode your file, using iconv.
Comment 5 Michael Soulier 2003-12-03 16:18:24 EST
> I'm not arguing semantics, I'm explaining how it works.

My apologies. I shouldn't take my frustration out on you.

> "LANG=fr_FR.ISO88591 vim <filename>" doesn't help, because the issue
is with
> the terminal expecting UTF-8 output. Putting vim in a Latin-1 locale
isn't
> going to correct that.

Right...

> To run the terminal in a Latin-1 locale, you would do something like:
> "LANG=fr_FR.ISO8859-1 gnome-terminal --disable-factory"

en_CA seems to work nicely. I'm not sure why --disable-factory is
required,
but it certainly seems to be.

> The reason 7.3 is different is that 7.3 did not default to UTF-8
locales.

Ah, understood.

> In any case, the problem is simple; you have to tell the terminal what
> encoding the stuff inside it will be in. In RHL 8, that encoding is the
> locale encoding;
>
> in RHL 9, that encoding is the locale encoding by default but
there's a menu
> to override it.

I'm using Fedora now, and I've found the encodings menu, and added the
western
ISO encoding I needed to display latin1. I don't see how to make it the
default for all new terminals. Is there a way to do that, either in
gnome-terminal or in the gconf registry?

> Alternatively, you can re-encode your file, using iconv.

Nice. I had no idea. Thanks.

Note You need to log in before you can comment on or make changes to this bug.