LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-16-2009, 04:42 PM   #1
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Rep: Reputation: 36
Question key combination for � symbol


Hi,

I would like to know if anyone knows what key combination can I use to get the symbol [�] ???

thanks!

Last edited by ceantuco; 06-16-2009 at 04:43 PM. Reason: misspelled
 
Old 06-16-2009, 05:56 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
Google:
http://www.wikihow.com/Type-Symbols-Using-the-ALT-Key
try alt 158 e.g.
but you must know this since you put the � in your title!

Last edited by mostlyharmless; 06-16-2009 at 05:58 PM.
 
Old 06-17-2009, 12:12 AM   #3
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Original Poster
Rep: Reputation: 36
hi mostlyharmless!!! thanks for the response! When I get data from my company's POS systems it comes with the ı symbol to separate spaces example:
1ıDanceımusicıhallııı10.98 so when I open that file using kwrite,kate,etc the ı symbol comes up as � that's why I wanted to know the key combination to � so I could format the data using oocalc without doing copy&paste of the symbol.
I tried alt+158 but it didn't work.
thanks tho.
 
Old 06-17-2009, 12:20 AM   #4
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Hm... Is this what you want?

teddy@lappy~/$ echo "1ıDanceımusicıhallııı10.98" | sed 's/ı/\ /g'
1 Dance music hall 10.98
 
Old 06-17-2009, 12:15 PM   #5
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Original Poster
Rep: Reputation: 36
hi Uncle_Theodore... I have to use oocalc to import the csv file so when you open it with oocalc it asks for separator options which by typing that symbol it would separate data then open the spreadsheet that's why I wanted to know how be able to enter that character using the keyboard.
 
Old 06-17-2009, 12:41 PM   #6
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Original Poster
Rep: Reputation: 36
uncle Theodore, you have giving me a good idea... my question is how do I type the command to replace ı with a ,.
thanks!
 
Old 06-17-2009, 12:43 PM   #7
GazL
Senior Member
 
Registered: May 2008
Posts: 3,503

Rep: Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025
Looks like a character-set/encoding issue to me. The correct way to handle this is probably to run your input file through a conversion utility such as iconv before you try and use it. The separator character is probably not the only character that may be incorrect.

Do you know what character-set/codepage the data from your POS system was written using?
 
Old 06-17-2009, 12:47 PM   #8
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Original Poster
Rep: Reputation: 36
ASCII ı (im on my windows machine now)
 
Old 06-17-2009, 12:52 PM   #9
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Original Poster
Rep: Reputation: 36
hi i tried cat cesar.csv | sed -e 's/�/,/' > cesar.txt but the problem is that � doesn't change for ,
any suggestions?
 
Old 06-17-2009, 01:22 PM   #10
GazL
Senior Member
 
Registered: May 2008
Posts: 3,503

Rep: Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025
Quote:
Originally Posted by ceantuco View Post
ASCII ı (im on my windows machine now)
I'm afraid that dosen't really help. ASCII only covers the first 128 characters, above 127, they all change depending on which country your system is in (amongst other things).

To make matters even worse, it's very likely that my browser isn't even showing the same character that you are seeing on your screen.

Can you post some of the output of

Code:
tail -1 cesar.csv | hexdump -C
That should help us see what character you're actually talking about.
 
Old 06-17-2009, 01:38 PM   #11
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Original Poster
Rep: Reputation: 36
# tail -1 cesar.csv | hexdump -c

0000000 1 5 375 2 1 0 2 3 6 375 0 2 2 0 0 0
0000010 375 T 375 2 0 0 9 - 0 6 - 1 3 375 2 2
0000020 : 1 2 : 1 2 375 T R A I L E R 375 375
0000030 375 375 1 375 375 375 375 375 375 375 375 375 M A J O
0000040 R D E T A I L L I N E C O U
0000050 N T : 375 2 1 375 0 . 0 0 375 0 . 0 0
0000060 375 0 . 0 0 375 0 . 0 0 375 2 2 : 1 2
0000070 : 1 2 375 375 0 . 0 0 375 375 0 375 \r \n
000007f

yeah I think it is going to be hard for me to get that ASCII character... In W$ndows the key combination is alt+0253
thanks for your help.
 
Old 06-17-2009, 02:44 PM   #12
GazL
Senior Member
 
Registered: May 2008
Posts: 3,503

Rep: Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025
Yep, it looks like the original data is in DOS cp437 with superscript-2 as the field seperator. I've actually seen that before, but I can't remember where ( could have been on IBM 4690 POS system, but I really can't remember).

Anyway, I found that

Code:
iconv -f CP437 -t iso8859-1 cesar.csv | tr -d "\r" >cesar.txt
Will convert it to look on unix how it looked on its original system.
The 'tr' is to alter the dos /r/n line endings to unix /n style endings.

Then to convert the superscript-2 to a comma you can just add another tr. Like this.

Code:
iconv -f CP437 -t iso8859-1 cesar.csv | tr -d "\r" | tr "\262" "," >cesar.txt

There's probably a tidier way using sed or awk, but as a quick and dirty that should do the trick.


PS. If you don't run your unix box on iso8859-1 then you might want to try -t utf-8 as an alternative.

Let me know how you get on with that. Sorry about the typo's it should be right now.

Last edited by GazL; 06-17-2009 at 03:04 PM. Reason: fixed typo
 
Old 06-17-2009, 03:00 PM   #13
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Original Poster
Rep: Reputation: 36
Cool

hi I tried:

Code:
iconv -f CP437 -t utf-8 cesar.csv | tr -d "\r" | tr "\252" "," > cesar.txt
and it does replace the � for ² but it doesn't replace ² for ,

any suggestions? or at least what key combination can I do to get ² ?

thanks for your time I really appreciate it!
 
Old 06-17-2009, 03:08 PM   #14
GazL
Senior Member
 
Registered: May 2008
Posts: 3,503

Rep: Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025
Quote:
Originally Posted by ceantuco View Post
hi I tried:

Code:
iconv -f CP437 -t utf-8 cesar.csv | tr -d "\r" | tr "\252" "," > cesar.txt
and it does replace the � for ² but it doesn't replace ² for ,

any suggestions? or at least what key combination can I do to get ² ?

thanks for your time I really appreciate it!
Yep, that was me. sorry I mistyped it's 262 not 252.

PS. utf-8 doesn't work on my slackware box; it converts the subscript-2 into a 2byte character so on second thoughts I'd stick with iso8859-1.

Last edited by GazL; 06-17-2009 at 03:27 PM.
 
Old 06-17-2009, 03:18 PM   #15
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Mint, Backtrack, OpenSuse
Posts: 560

Original Poster
Rep: Reputation: 36
with /262 it changed to � .... lol any ideas?
 
  


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
Tilde? What's the key combination to get it ? DOTT.EVARISTI Linux - Software 8 07-06-2007 07:07 AM
Ascii key combination? pidg30n Linux - Desktop 1 06-20-2007 05:09 PM
Bind Mouse Button Combination to Keyboard Key Combination? neoAKiRAz Linux - Desktop 0 05-04-2007 01:49 PM
Mysterious key combination keeps restarting X rose_bud4201 Linux - Software 13 03-04-2006 12:31 PM
Create Key Combination/Binding kegwell Linux - General 2 02-16-2006 09:03 PM


All times are GMT -5. The time now is 08:51 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration