LinuxQuestions.org
Visit Jeremy's Blog.
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 07-28-2003, 09:15 AM   #1
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
How to insert characters by ascii code?


Is it possible to insert characters on the command line or in vi by ascii code?

I badly need it, since I cannot enter some important characters from the keyboard when i login with ssh into a remote site. (That site uses a localised charset) It is peculiar that presently I have to concatenate files on the system just because the other file contains the character I need, and once the character is in the right file, I can somehow copy it in the right places inside the file.
 
Old 07-28-2003, 04:30 PM   #2
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
I thought it is a lame question, but it turned out to be a hard one.

So is there a guru knowing how to insert the 'less than' character that does not appear to be on your keyboard? (the case of an english keyboard with ISO-8859-2 codepage).

Should I scp the file to a windows partition, bootup Windows, insert the character then boot into Linux again, login to the remote site and scp the file to its place, or is there a slightly simpler solution in the Linux world?
(like ALT+60 in windows)

Last edited by J_Szucs; 07-28-2003 at 04:35 PM.
 
Old 07-28-2003, 07:20 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hmmm ... there's always yudit :) ... a nice
unicode editor.

Cheers,
Tink
 
Old 07-29-2003, 08:18 AM   #4
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
I do not need unicode, but a pure ascii or iso 8859-2 'less than' sign in unix.
The last time I needed it in a regexp in a bash script. It took 10 minutes until I found it in an other file and inserted that character into my script, since I cannot type it from my keyboard.
I cannot type it in windows either, but there I can insert it by ALT 60.
I do not believe I cannot do the same in unix. But it looks like that.
 
Old 07-29-2003, 02:34 PM   #5
rmartine
Member
 
Registered: Dec 2002
Location: San Luis Obispo, CA
Distribution: Fedora Core 3
Posts: 618

Rep: Reputation: 30
There is probably a way to remap the keyboard to assign the "<" symbol to some useless unused key... ala the windows key.

Try checking this link out

http://www.nvg.ntnu.no/linux/sunsite...ole-HOWTO.html

I hope this is at least related to what you were asking about.

Good Luck
 
Old 07-29-2003, 06:20 PM   #6
homestead1000
Member
 
Registered: Jul 2003
Location: San Diego, CA USA
Distribution: RH 7x,8x,9x, RHE 3, Fedora Core1
Posts: 38

Rep: Reputation: 15
I'm not sure what you really want to do but I'd suggest this as a start.

http://www.linux.org/docs/ldp/howto/...-HOWTO-12.html
 
Old 07-29-2003, 06:51 PM   #7
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
Well, I happened to meet and more or less read that howto before, but I found it too complicated and hoped that there was a more simple way.
It turned out that there was no simple way, so I modified the keymap (hu.map.gz), to have the 'less' sign.
It works OK in terminal mode, but not under X. (I know I have to read some more hours...)
I will have to do it all over again any time I re-install or upgrade my system (just one more item on the long todo list).
 
Old 11-05-2003, 03:39 PM   #8
ligne
LQ Newbie
 
Registered: May 2003
Location: bristol uni
Distribution: MDK 10 Official and Gentoo
Posts: 6

Rep: Reputation: 0
has anyone figured out a way of using the ASCII codes that doesn't involve modifying the keymap? (unfortunately, i don't really have enough spare keys to get all the ones i want/need: ÄÀÈÉÖÜÙÔÇßàäçèéêëòöüù ). copying the relevant characters across from KCharSelect or whatever is also rather too clumsy and awkward for day-to-day use...

any help or suggestions would be very gratefully received! this is really a rather annoying little problem for me.

--matt
 
Old 09-12-2013, 10:40 PM   #9
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
Lightbulb This came up when I was looking for how do to stuff, so...

I know this is an ancient thread, but since Google put it near the top when I was trying to figure out how to enter ASCII symbols by number code, I figured I should post the solution here.

CTRL + SHIFT + u
Then type a number and press ENTER.

Hope this helps someone! :-)
 
1 members found this post helpful.
Old 09-14-2013, 02:14 AM   #10
NeXuS_2006
Member
 
Registered: Dec 2003
Distribution: Fedora
Posts: 64

Rep: Reputation: 18
Quote:
Originally Posted by DaneM View Post
I know this is an ancient thread, but since Google put it near the top when I was trying to figure out how to enter ASCII symbols by number code, I figured I should post the solution here.

CTRL + SHIFT + u
Then type a number and press ENTER.

Hope this helps someone! :-)
This was really frustrating to me a couple weeks ago. The trickiest part is to press CTRL + SHIFT + u, and then release only u, type the code, then release CTRL+SHIFT. Its a magical experience
 
1 members found this post helpful.
Old 09-14-2013, 05:28 AM   #11
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
Quote:
Originally Posted by NeXuS_2006 View Post
This was really frustrating to me a couple weeks ago. The trickiest part is to press CTRL + SHIFT + u, and then release only u, type the code, then release CTRL+SHIFT. Its a magical experience
Indeed, this is the proper technique! Thanks for clarifying, NeXuS_2006.
 
1 members found this post helpful.
Old 09-14-2013, 11:10 AM   #12
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,136

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
This is a Gnome thing, or rather it depends on having GTK_IM_MODULE using its built-in features. I use Gnome, but use xim input (to enable me to use ~/.XCompose) so it doesn't work for me.
 
1 members found this post helpful.
Old 06-16-2017, 04:14 PM   #13
jcchile
LQ Newbie
 
Registered: Jun 2017
Posts: 1

Rep: Reputation: Disabled
Smile What is then the missing link?

Quote:
Originally Posted by NeXuS_2006 View Post
This was really frustrating to me a couple weeks ago. The trickiest part is to press CTRL + SHIFT + u, and then release only u, type the code, then release CTRL+SHIFT. Its a magical experience
This was the best tip ever.

BUT it seems to me still there's something missing... maybe to activate some "hidden" levels, as described here:
https://help.ubuntu.com/community/ComposeKey

Can anyone give extra light on this please?
 
Old 06-16-2017, 09:23 PM   #14
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Moderator response

Please refrain from resurrecting necro threads.
 
Old 06-17-2017, 12:33 PM   #15
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,136

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Quote:
Originally Posted by jcchile View Post
BUT it seems to me still there's something missing... maybe to activate some "hidden" levels, as described here:
https://help.ubuntu.com/community/ComposeKey
Can anyone give extra light on this please?
Ctrl-Sh-U doesn't work in every environment. It's actually the least convenient way to insert characters — after all, how many codes do you know? For special characters,
1. Use Compose, after setting a compose key.
2. Check if your character is in your keyboard driver, available from AltGr.
3. Use the character picker in the menu.
4. Use the character picker in a word-processor menu.
5. If your GUI supports it, put a character palette on the panel and populate it with the characters you need.
 
  


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
mouse keys and non-ascii characters elyk Slackware 8 12-02-2005 12:46 PM
typing high-ascii characters gerrym Linux - Newbie 1 08-12-2004 12:38 AM
Extended ASCII characters in UNIX MatSzor Programming 5 05-15-2004 09:57 PM
ascii characters lakshman Linux - General 1 03-14-2003 11:28 AM
Deleting non ASCII characters Thinkgeekness Linux - Networking 4 03-04-2003 01:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration