LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-05-2007, 08:44 AM   #1
chandru.in
Member
 
Registered: Jun 2005
Location: Bangalore, India
Distribution: Kubuntu 7.10
Posts: 165

Rep: Reputation: 30
Unhappy How to make konsole/terminal and emacs to recognize UTF-8 encoding?


Hi,

I'm using Kubuntu 7.10.

When I use gcc to compile C programs, neither konsole nor the tty terminals nor emacs recognizes the UTF-8 encoded quotes in the output of gcc. However, if I redirect the output to a file and open with kate, it recognizes them.

Now if I set the environment variable LC_ALL=C, everything is fine in consoles and emacs, but kate loses UTF-8 recognition. So, I want a way to make Konsole, Terminals and emacs recognize and display the UTF-8 quotes properly rather than disabling UTF completely by setting LC_ALL.

Could someone tell me how to do it?
 
Old 12-05-2007, 10:28 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
In konsole, does it work if you do:
Settings [menu] -> Encoding -> Unicode (utf8)
 
Old 12-05-2007, 10:35 AM   #3
chandru.in
Member
 
Registered: Jun 2005
Location: Bangalore, India
Distribution: Kubuntu 7.10
Posts: 165

Original Poster
Rep: Reputation: 30
Ooops!! I missed it. Now Konsole is fine.

How about tty terminals and Emacs (both in GUI and terminal)?
 
Old 12-05-2007, 10:40 AM   #4
chandru.in
Member
 
Registered: Jun 2005
Location: Bangalore, India
Distribution: Kubuntu 7.10
Posts: 165

Original Poster
Rep: Reputation: 30
I found for emacs too. Only TTY terminals are remaining.

For emacs I added the following line to ~/.emacs

Quote:
(prefer-coding-system 'utf-8)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Locale problem: Can't convert string from native encoding to 'UTF-8' treotan Ubuntu 1 11-14-2007 08:02 AM
Alt no longer META key when using in-terminal option of Emacs (emacs -nw) frznchckn Linux - Software 1 06-02-2007 02:41 AM
determine encoding type of a file (ie - UTF-8) chovy Linux - Software 1 04-03-2006 12:46 AM
KDE konsole - Gnome-terminal language encoding or keytab thk33 Linux - Software 3 09-19-2004 03:59 PM
UTF-8 problem in irssi (Fedora, Konsole) marenkiapina Linux - Newbie 2 03-22-2004 09:58 AM


All times are GMT -5. The time now is 09:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration