LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-23-2012, 03:16 AM   #1
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
How to insert Unicode (or extended ASCII) characters in text files?


Not sure if this question should go here or under software so I put it here. Moderator can move if desired.

I know that word processors have facilities for inserting special characters (Unicode) into documents. What I want to do is have something similar using a plain text editor like Kate or Gedit. I've tried goint the compose key route but that seems to be rather limited as to what characters can be generated.

So far I've been using cut & paste from charts but that is a PITA. Things like symbols for currency, mathematics, engineering, etc.

For example (cut & pasted) .

Thanks, Tom
 
Old 03-23-2012, 06:25 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,218

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
It is depended on keyboard layout rather than editor. And compose key is one of solutions, I don't think it is limited. For example € is created by "E" followed by "=", by "o" followed by "c", Œ is "O" and "E", is "o" and "s", etc. For list of possible combinations look at your /usr/share/X11/locale/en_US.UTF-8/Compose and other locales if you have. You can also configure your own combinations (look at "man Compose"), but I do not tested this.

The other methods are configure your own keyboard layout, but if you want to use many non standard characters you can stuck at too low buttons on your keyboard. But other hand you can define many layouts and easily switch between them.
 
Old 04-02-2012, 08:23 PM   #3
Geriao
Member
 
Registered: Dec 2009
Distribution: Ubuntu Karmic Koala, Slackware 13.0
Posts: 66

Rep: Reputation: 16
Also, if you know the hex code for the character you want to insert, simply go to your editor and press "CTRL + SHIFT + U". A small underlined "u" will appear, and then insert the hex code (in lower case) and then enter. For example, is "d1", is "a2", etc.
 
1 members found this post helpful.
Old 04-03-2012, 12:50 PM   #4
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,075

Rep: Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789
If you copy the compose file to ~/.XCompose, you can edit it and add anything you need. In fact, all the symbols you've listed are there: http://www.hermit.org/Linux/ComposeKeys.html
I've added things like ≥, ≠, and ∅.

For things where you can't think of a combination, you can use the AltGr key. Just add the extras to your /usr/share/X11/xkb/symbols/us file:
key <AE04> {[4, dollar, sterling]};
will give from AltGr+4 instead of using Compose L-.

Last edited by DavidMcCann; 04-03-2012 at 12:55 PM.
 
Old 12-28-2012, 05:28 PM   #5
KurtBleach
LQ Newbie
 
Registered: Jun 2012
Location: New Jersey, USA
Distribution: openSUSE 13.1
Posts: 21

Rep: Reputation: Disabled
Big thanks to Geriao.
I have searched far and wide for the answer on this issue.
So simple to do, it is brilliant.

Hey, I don't know how "relevant and timely" I might be here , but I haven't posted in some time and this here bump could help other people looking for a genius solution for posting with ASCII.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
non-ascii characters in bash script and unicode igor.R Linux - Newbie 31 12-29-2012 03:45 AM
Extended ASCII characters on Framebuffer Console BoraxMan Linux - Desktop 3 12-12-2011 11:10 AM
using extended ascii characters sasser Linux - Newbie 2 04-06-2010 08:50 AM
bash printing extended ASCII characters nutthick Programming 6 02-04-2005 02:15 PM
Extended ASCII characters in UNIX MatSzor Programming 5 05-15-2004 09:57 PM


All times are GMT -5. The time now is 06:04 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