LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Equivalent of Alt-X in Wordpad for Linux? (http://www.linuxquestions.org/questions/linux-newbie-8/equivalent-of-alt-x-in-wordpad-for-linux-928127/)

goemon 02-07-2012 12:08 PM

Equivalent of Alt-X in Wordpad for Linux?
 
I am wondering what the best way to discover the ASCII or Unicode values of a character in Linux is. For example, in Windows I could cut and paste the character into a Wordpad doc, then hit Alt-X to find out the value.

Is there a similar way to do this with Linux? I am trying to identify values for some odd multibyte characters and this is (thus far) eluding me!

Thank you!

Thor_2.0 02-07-2012 12:16 PM

Hi,

How about this page? Click on a language/script/font and you'll get a pdf sent back

Thor

goemon 02-07-2012 12:27 PM

No, there's no way to know what chart will contain the character. For example, if I have "" how do I know which chart to use? If I already know its value, then yes, the charts are helpful because they contain a range of similar characters. But if I only have the character itself...how can I find its value? Looking through the hundreds of thousands of characters until I find it isn't an option. :-)

Thor_2.0 02-07-2012 12:48 PM

Whoops, no, that is NOT the way 4ward....
I looked into the it and found a site where you can enter the code (tried the one you provided) and see what character that is...this searcher seems to work as well.
Please try it and post back with your thoughts...

DavidMcCann 02-07-2012 01:48 PM

You can use a hex editor in the way you use wordpad; look in your distro's package installer to see what's available. Alternatively, if you know what it's called, you can search the character map: looking for 'fourth root' takes you to U+221C.

SecretCode 02-07-2012 02:28 PM

You can get the UTF-8 encoding with
Code:

hexdump <(echo paste-character-here)
e.g
Code:

hexdump  <(echo -n )
0000000 bbc2                                 
0000002

Of course, that's not the same as the Unicode representation ...

goemon 02-07-2012 03:22 PM

@SecretCode and DavidMcCann, if I can combine your two posts I'll have exactly what I'm looking for! :-) Ideally it would be a command or shell script that will take an input that's just cut and pasted, then return a nice Unicode value. Alternatively, if I can take the hexdump value (bbc2) and then transmogrify it to a Unicode value in two steps rather than one, that's fine too! Any thoughts?

SecretCode 02-08-2012 01:51 PM

I felt there must be a canonical translation between UTF-8 representations and Unicode points, but I looked for a while and couldn't find it. 101% of the web pages about converting unicode are unicode --> visible character, not the other way.


All times are GMT -5. The time now is 11:31 PM.