3

I am checking for the ASCII value of the pound sign (£). I've found multiple answers:

  1. http://www.ascii-code.com/ Says A3 = 163 is the ASCII value of the pound sign.
  2. http://www.asciitable.com/ Says 156 is the Pound sign and 163 is some other character.
  3. http://en.wikipedia.org/wiki/Pound_sign : Says Alt+163 and Alt+156 both are the ways to type pound sign in US keyboard. I assume here 163 and 156 means ASCII values. (But only 163 works for me)

What is the correct way?

EFrank
  • 1,880
  • 1
  • 25
  • 33
Nasir
  • 708
  • 2
  • 11
  • 28
  • Alt codes and ASCII values are *not* the same thing. – Biffen Jul 10 '14 at 11:16
  • ASCII is an historical character set. It has been for decades. What's your interest in it? In other words, if you are using a particular language, library or operating system, it'd be better to state it; Then, you can figure out which character set and encoding is relevant. – Tom Blodget Jul 11 '14 at 00:25

3 Answers3

11

156 is not the ASCII value for anything. ASCII is 7 bit, and only goes to 127.

163 in Unicode and Latin-1 (aka ISO-8859-8) is the pound sign

Benny
  • 432
  • 1
  • 6
  • 21
8

There is no ASCII code for the pound sign. ASCII only defines codes 0-127 in the tables you've linked; everything beyond that is extensions. You'll need to determine which extension to ASCII you're using.

The pound sign has number 163 in Latin-1 (aka ISO-8859-1), and number 156 in code page 437. It also has number 163 in Unicode, though you'll need to encode it as more than one byte.

legoscia
  • 39,593
  • 22
  • 116
  • 167
4

On PC make sure the Num Lock is on first. Then Hold down ALT and type 0163 on the numeric keypad. You will get £.

mino
  • 57
  • 1