Bug 88736

Summary: lack of 8-bit ascii support
Product: [Retired] Red Hat Linux Reporter: Michael Soulier <msoulier>
Component: gnome-terminalAssignee: Havoc Pennington <hp>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-12 19:34:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
xml file containing 8-bit ascii none

Description Michael Soulier 2003-04-12 18:43:28 UTC
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 19:17:36 UTC
Created attachment 91101 [details]
xml file containing 8-bit ascii

Comment 2 Havoc Pennington 2003-04-12 19:34:33 UTC
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 17:53:47 UTC
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 23:56:49 UTC
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 21:18:24 UTC
> 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.