Cannot change default character encoding

Bug #3923 reported by Henrik Holmboe
124
This bug affects 23 people
Affects Status Importance Assigned to Milestone
GNOME Terminal
Fix Released
Wishlist
gnome-terminal (Debian)
Fix Released
Unknown
gnome-terminal (Ubuntu)
Fix Released
Wishlist
Ubuntu Desktop Bugs

Bug Description

I know utf-8 is great and all, but for the moment I want to run ISO-8859-1(5). I need to manually change this every time I start the application, which is kind of annoying since it should be possible to set it by default.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Can't you just change the locale if you reconfigure the locales package?

Changed in gnome-terminal:
assignee: nobody → gnome
Revision history for this message
Henrik Holmboe (holmboe) wrote :

That was the solution. Sorry for the noise.

(Noticed the overall tone of my bugreport and I didnt intend to come off as rude.)

Thanks for your time!

Jeroen (jeroenubuntu)
Changed in gnome-terminal:
status: New → Rejected
status: New → Rejected
Revision history for this message
Kozman Bálint (qzy) wrote : set default encoding from command line

Hi there,

i had the same problem for quite long, and i didn't even want to change my locale setting just to make gnome terminal use a different encoding. This small patch adds the "--encoding=" command line option, which makes it possible to set default encoding from command line (and possibly use an alias to avoid manual setting every time the terminal starts off). It doesn't touch any part of the terminal profile and soever. Patch works against 2.13.91-ubuntu1.

Cheers,
Balint

Changed in gnome-terminal:
assignee: gnome → desktop-bugs
status: Rejected → Unconfirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Upstream bug about that: http://bugzilla.gnome.org/show_bug.cgi?id=108711

I've forward the bug and the comment with the patch

Changed in gnome-terminal:
status: Unconfirmed → Confirmed
Changed in gnome-terminal:
status: Unconfirmed → Confirmed
Revision history for this message
Caspar Clemens Mierau (leitmedium) wrote :

I think this can also be applied by just starting gnome-terminal with a different "env" setting, so this can be closed as it is rather old, right?

Revision history for this message
Henrik Holmboe (holmboe) wrote : Re: [Bug 3923] Re: Cannot change default character encoding

Please ignore my ignorance, but what "env" setting is that? One of the
ones from locale(1)? I would guess LC_CTYPE.

Is it possible to make this the default in a GNOME session? Perhaps it
would be possible to prepend for example "LC_TYPE=sv_SE.iso885915" to
the commandline to be run for the Terminal entry in the applications
menu?

--
Henrik Holmboe, Stockholm, Sweden
<http://henrik.holmboe.se/contact/>

Revision history for this message
Haz (haz2a) wrote :

A permanent config for the character set would be very useful. It has long been a feature of PuTTY (Terminal > Translation > Chr Set).
It would be best set in Profiles (similar to PuTTY's saved session) rather than globally, because its often required only for some specific purpose.

The only way I have been able to do this so far, as suggested in http://osdir.com/ml/gnome.os.redhat/2002-10/msg00022.html, is to first setup the required locale eg: via:
$ sudo locale-gen en_GB.ISO-8859-15
so that the new locale is listed by
$ locale -a
(as 'en_GB.iso885915').

Then I start GT like:-
$ env LC_CTYPE=en_GB.ISO-8859-15 gnome-terminal ... --disable-factory

But some of my Ubuntu's are resistant to enabling or using the new locale. Although it is listed by 'locale -a' as above, when I try to start GT as described above I get: "gnome-terminal: 7773: ... locale not supported by C library".
And yet I can select the same chr set from GT's Terminal > Set Chr Encoding menu!?
One of my GT's also shows its 'Current Locale' as 'ANSI_X3.4-1968' even though this is not listed by 'locale -a' at all!?

Any helpful comments about these problems would be much appreciated.

Revision history for this message
Haz (haz2a) wrote :

Above method does work reliably.
Only 1 of my Ubuntus will not accept it - but then it isn't reading the current default locale of en_GB.UTF-8 either which is why its resorting to ANSI(ASCII). I might try just reinstalling Gnome Terminal. The Ubuntu in question is a 6.06 LTS - but then others of these work OK.

Still it would be nice to have a Character Set option in GT Profiles.

Revision history for this message
collinp (collinp) wrote :

Way too old to be relevant.

Changed in gnome-terminal (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Accord Tsai (accordtsai) wrote :

For me, this bug is still valid and not fixed. I would like the encoding to be part of terminal profiles.

Revision history for this message
Lee Braiden (lee-braiden) wrote :

Another vote for getting this fixed ASAP. I think the encoding choice should be part of the profiles. Encodings are such an easy thing to miss that not having the option to easily set preferences and have them as default is quite dangerous imho.

Changed in gnome-terminal (Ubuntu):
status: Invalid → Confirmed
Changed in gnome-terminal (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Silvio Levy (levy-msri) wrote :

For me it would be great to set the default encoding in gnome-terminal to something different from the current locale. There is a patch http://launchpadlibrarian.net/1650379/default_encoding-2.13.91.diff
 that's supposed to do that. Perhaps it could be checked by a developer and implemented if found to be valid? Thank you

Silvio Levy

Revision history for this message
Victor Zamanian (victorz) wrote :

My need isn't really to have a default setting, even though that would be nice (looking at you, COLLIN PRUITT, who invalidated this so blatantly). I am more interested in a argument flag to gnome-terminal that says "use this encoding for this session".

Revision history for this message
raczgabor (raczgabor) wrote :

+1 vote for the preceding comment.
Moreover, unfortunately, I do not know how to use the .diff patch file. :(

Revision history for this message
Haavard Ostermann (haavard-ostermann) wrote :

+1 to add --encoding as a flag to define character set for that session. I need my terminal to use iso-8859-1 some times, and the described workarounds above are neither user friendly or reliable.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Can people please stop adding +1 comments. They aren't useful and they just create unnecessary bug spam for people subscribed. The bug tracker isn't a place to poll or vote, but if you want to register that the bug affects you, then there is a link at the top of the page which allows you to do this without e-mailing lots of people (https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/3923/+affectsmetoo)

David Futcher (bobbo)
tags: added: patch-forwarded-upstream
Revision history for this message
B Bobo (yout-bobo123) wrote :

Chris Coulson, neither of the comments which you appear to dislike are simply +1 votes; rgaobr said he doesn't know how to use the .diff patch file, and Haarvard Ostermann wrote that the workarounds are neither user friendly nor reliable, both of which are perfectly legitimate comments on a bug tracker.

To rgaobr, you need to download gnome-terminal-dev which contains the source code for the software, as well as the .diff patch file. To use the patch, change directory "cd gnome-terminal" and type "patch -p1 < ../default_encoding-2.13.91.diff" (or whatever path you downloaded the patch file).

Changed in gnome-terminal:
importance: Unknown → Wishlist
Revision history for this message
marcobra (Marco Braida) (marcobra) wrote :

I want use Utf8 as default coding and i cannot get it as default at terminal starting
my locale is correctly configured but i always get as default encoding ANSI_X3.4-1968

A work around on Ubuntu 10.04.2

cd .gconf/apps/gnome-terminal/global/
mv %gconf.xml $HOME/.

I do a logout and then i login before login i set/check the lang setting from login screen option (gdm) and

.gconf/apps/gnome-terminal/global/%gconf.xml

was recreated and now from terminal i can have Utf8 as default.

Hope this helps

Revision history for this message
Axel Beckert (xtaran) wrote :

Seems to be more or less the same issue as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512497

Changed in gnome-terminal (Debian):
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-terminal - 3.3.0-0ubuntu1

---------------
gnome-terminal (3.3.0-0ubuntu1) precise; urgency=low

  * New upstream release.
    - Add gconf setting to change default encoding (LP: #3923)
    - Should work now on Broadway
 -- Jeremy Bicha <email address hidden> Thu, 23 Feb 2012 10:10:15 -0500

Changed in gnome-terminal (Ubuntu):
status: Triaged → Fix Released
Changed in gnome-terminal:
status: Confirmed → Fix Released
Changed in gnome-terminal (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.