Author Topic: ASCII Characters  (Read 82876 times)

Offline Bob B.

  • Jupiter
  • ***
  • Posts: 819
  • Bob the Excel Guru™
    • Rocket & Space Technology
ASCII Characters
« on: January 16, 2013, 08:54:58 AM »
Since many scientific variables are represented by Greek letters, I've often tried to use ASCII codes to display these when posting to the forum.  I'm almost certain that at one time this worked, but lately no.  (Perhaps the last software update disabled something.)  Doubly frustrating is that often the characters seem to display OK in a preview, but when I post, they're replaced by a ? symbol.  Do you know of anyway to use or allow special characters?

(edit)  Oops!  I actually meant to post this in The Space Race Forum but the same question might apply here because I believe we're using the same software.
« Last Edit: January 16, 2013, 09:05:22 AM by Bob B. »

Offline Bob B.

  • Jupiter
  • ***
  • Posts: 819
  • Bob the Excel Guru™
    • Rocket & Space Technology
Re: ASCII Characters
« Reply #1 on: January 16, 2013, 09:13:08 AM »
The following is a test

∞ ÷ Δ ω

(edit)  OK, nevermind.  It looks like all the characters displayed correctly.  The problem I'm having at The Space Race forum is apparently not happening here.  That's odd because I believe Lunar Orbit is using the same software at both forums.
« Last Edit: January 16, 2013, 09:17:37 AM by Bob B. »

Offline LunarOrbit

  • Administrator
  • Saturn
  • *****
  • Posts: 1059
    • ApolloHoax.net
ASCII Characters
« Reply #2 on: January 16, 2013, 11:30:34 AM »
Hmmm. Yeah, it's the same software. I'll have to look into it when I get home.
It suddenly struck me that that tiny pea, pretty and blue, was the Earth.
I put up my thumb and shut one eye, and my thumb blotted out the planet Earth.
I didn't feel like a giant. I felt very, very small.
- Neil Armstrong (1930-2012)

Offline Not Myself

  • Earth
  • ***
  • Posts: 217
  • Unwanted Irritant
Re: ASCII Characters
« Reply #3 on: January 27, 2013, 12:27:16 PM »
I've often tried to use ASCII codes to display these when posting to the forum.

May I ask what exactly this method is?  Did you enter some kind of code for characters in the 128-255 range?  Is that the way you entered the characters in the later post, or was that a cut-and-paste job?

The internet - where bigfoot is real and the moon landings aren't.

Offline grmcdorman

  • Earth
  • ***
  • Posts: 151
Re: ASCII Characters
« Reply #4 on: January 27, 2013, 04:25:37 PM »
By the way, just to be pedantic: those characters aren't ASCII. ASCII is only the first 96 characters (ordinals 32 through 127, basically the characters on a US keyboard: letters, digits, and punctuation). Characters above 128 vary; the three most common 8-bit character sets are ISO LATIN-1 (ISO-8859-1), the Windows character set (Windows-1252), and UTF-8. Given that Bob B. is trying to enter Greek characters, he probably expects Latin 1 or UTF-8.


My Web developer tools in Firefox report this site as UTF-8, by the way.

/pedant

Offline ka9q

  • Neptune
  • ****
  • Posts: 3014
Re: ASCII Characters
« Reply #5 on: January 27, 2013, 10:12:23 PM »
To contribute to the pedanticism, UTF-8 is not an 8-bit character set. It is a variable length (1-4 byte) encoding of the (very large) Unicode character set, designed such that the first 128 entries have the same encoding as 8-bit ASCII. (ASCII is actually a 7-bit code, so 8-bit ASCII has a '0' in the most significant bit.)

When other Unicode characters are needed, UTF-8 always encodes them into two or more bytes.

So how do we enter Greek or other non-ASCII characters?

Offline Bob B.

  • Jupiter
  • ***
  • Posts: 819
  • Bob the Excel Guru™
    • Rocket & Space Technology
Re: ASCII Characters
« Reply #6 on: January 27, 2013, 10:28:44 PM »
If you have a table of codes like this one,

http://www.asciitable.com/

you can display the character by typing in the number of the character while holding down the ALT key.  For example, if I press and hold ALT while typing 234 235 236 237 238, I get Ωδ∞φε.  You can also copy and paste characters from other sources.
« Last Edit: January 27, 2013, 10:31:38 PM by Bob B. »

Offline Not Myself

  • Earth
  • ***
  • Posts: 217
  • Unwanted Irritant
Re: ASCII Characters
« Reply #7 on: January 28, 2013, 01:14:11 AM »
If you have a table of codes like this one,

http://www.asciitable.com/

you can display the character by typing in the number of the character while holding down the ALT key.  For example, if I press and hold ALT while typing 234 235 236 237 238, I get Ωδ∞φε.  You can also copy and paste characters from other sources.

Ah I see.  Then I would say the problem is almost certainly one of encoding, and specifically what grmcdorman cites.

By the way, just to be pedantic: those characters aren't ASCII. ASCII is only the first 96 characters (ordinals 32 through 127, basically the characters on a US keyboard: letters, digits, and punctuation). Characters above 128 vary; the three most common 8-bit character sets are ISO LATIN-1 (ISO-8859-1), the Windows character set (Windows-1252), and UTF-8. Given that Bob B. is trying to enter Greek characters, he probably expects Latin 1 or UTF-8.


My Web developer tools in Firefox report this site as UTF-8, by the way.

/pedant

Getting in the spirit of things:

[pedant]Pretty much all the common encodings (including UTF-8) agree on the meanings of up to 127; from 128 to 255 is encoding-specific.  Many old systems used the eighth bit for parity or similar purposes.  When that stopped being cool and trendy, the eighth bit became available to convey non-redundant information, and was frequently used to encode characters commonly used in non-English languages, which were not included in the lower 128.  But there are too many Greek, Russian, Hebrew, etc. letters, to fit in the range 128-255.  As a result, in computer in Israel may well use the range 128-255 to use different characters than a computer in Russia, and opening a document produced in one country on a computer in another may result in the display of gibberish, if the software on the target computer is not capable of identifying (or being told) and using the correct encoding.

So I would think that what is happening on the other board is, you are entering characters using one encoding, and it displays them using a different encoding, the result of which will be perfectly OK for characters up to 127, but gibberish after that.  So options are

a) change the default encoding on the other board to what you want - would have to be something the board software can do, and the board administrator would agree to.

b) use the existing default encoding on the other board - the default encoding would have to support the characters you want, and you would have to cope with entering the same character one way on that board, and a different way on other boards.

c) change the encoding on a message-by-message basis - I don't know whether this is possible, but maybe there is a bbcode or something of the like that does it.

Seems to me the world is moving towards UTF-8 (as per above, a 1-4 byte encoding, in which certain bytes indicate that this character is continued into the next byte, but coincides with ASCII up to 127), but maybe there are good reasons to stick with other encodings.
[/pedant]

« Last Edit: January 28, 2013, 02:10:09 AM by 紅毛 »
The internet - where bigfoot is real and the moon landings aren't.

Offline Not Myself

  • Earth
  • ***
  • Posts: 217
  • Unwanted Irritant
Re: ASCII Characters
« Reply #8 on: January 28, 2013, 01:24:57 AM »
Decided to register at the other place to see if I could work out what the encoding was, but got

Quote
The user Oxyartes with Email <email address> (IP <IP address>) is a Spam, please contact forum administrator.

with no immediately obvious way of contacting the aforementioned administrator.

This board can even handle things like 紅毛, I'd be surprised if it weren't UTF-8.
The internet - where bigfoot is real and the moon landings aren't.

Offline Not Myself

  • Earth
  • ***
  • Posts: 217
  • Unwanted Irritant
Re: ASCII Characters
« Reply #9 on: January 28, 2013, 01:42:17 AM »
If you have a table of codes like this one,

http://www.asciitable.com/

you can display the character by typing in the number of the character while holding down the ALT key.  For example, if I press and hold ALT while typing 234 235 236 237 238, I get Ωδ∞φε.  You can also copy and paste characters from other sources.

Looks to me like you are using Code Page 437.

http://en.wikipedia.org/wiki/Code_page_437

Given that this works for you here at this board, which I think must be using UTF-8, I'm actually scratching my head a bit wondering how this is actually working.

So on your computer, you enter the code for Greek letters, based on Code Page 437.  Your browser queues these up displaying (I assume) them properly, and then when you click "post", transfers the whole lot to this board, where I can view what you typed properly.

So one possibility is, this board knows that you are using Code Page 437, and interprets your post using this Code Page whenever it is displayed.  But if that's the case, then I shouldn't be able to do this: 紅毛, since these characters aren't in the CP-437 character set.

Another possibility is, the board stores everything in UTF-8, but you are entering things in CP-437 (which does not match UTF-8 on 128-255), so some piece of software does the mapping form CP-437 to UTF-8.  Which piece of software that is, and whether it is on your computer, or the computer the board is served from, I do not know.

The internet - where bigfoot is real and the moon landings aren't.

Offline LunarOrbit

  • Administrator
  • Saturn
  • *****
  • Posts: 1059
    • ApolloHoax.net
Re: ASCII Characters
« Reply #10 on: January 28, 2013, 04:00:29 AM »
Decided to register at the other place to see if I could work out what the encoding was, but got

Quote
The user Oxyartes with Email <email address> (IP <IP address>) is a Spam, please contact forum administrator.

with no immediately obvious way of contacting the aforementioned administrator.

This board can even handle things like 紅毛, I'd be surprised if it weren't UTF-8.

I'm the admin of the other forum. Send me a PM here with the email address you used and I'll create an account for you.
It suddenly struck me that that tiny pea, pretty and blue, was the Earth.
I put up my thumb and shut one eye, and my thumb blotted out the planet Earth.
I didn't feel like a giant. I felt very, very small.
- Neil Armstrong (1930-2012)

Offline LunarOrbit

  • Administrator
  • Saturn
  • *****
  • Posts: 1059
    • ApolloHoax.net
Re: ASCII Characters
« Reply #11 on: January 28, 2013, 04:19:00 AM »
Never mind, I got the email address from the error log. I tried setting up an account for you and got an error saying that address was being used by another account already.

Quote
This board can even handle things like 紅毛...

Yeah, I meant to talk to you about that. I would like you to change your display name back to what it was when you registered because people can't easily refer to you by name if they can't figure out how to type the characters. If you don't want to use that name for some reason then another name using a-z and 0-9 characters is okay too. Thanks.
It suddenly struck me that that tiny pea, pretty and blue, was the Earth.
I put up my thumb and shut one eye, and my thumb blotted out the planet Earth.
I didn't feel like a giant. I felt very, very small.
- Neil Armstrong (1930-2012)

Offline Not Myself

  • Earth
  • ***
  • Posts: 217
  • Unwanted Irritant
Re: ASCII Characters
« Reply #12 on: January 28, 2013, 05:31:59 AM »
In the opposite order:

Yeah, I meant to talk to you about that. I would like you to change your display name back to what it was when you registered because people can't easily refer to you by name if they can't figure out how to type the characters. If you don't want to use that name for some reason then another name using a-z and 0-9 characters is okay too. Thanks.

It is now changed to something that should be easily typed on western keyboards.

Never mind, I got the email address from the error log. I tried setting up an account for you and got an error saying that address was being used by another account already.

 :-[  I guess I forgot.

I'll go have a look and try to locate my old ID.
The internet - where bigfoot is real and the moon landings aren't.

Offline Not Myself

  • Earth
  • ***
  • Posts: 217
  • Unwanted Irritant
Re: ASCII Characters
« Reply #13 on: January 28, 2013, 05:35:47 AM »
Ah yes.  It was an ID I hadn't used in quite a long time  :-[
The internet - where bigfoot is real and the moon landings aren't.

Offline LunarOrbit

  • Administrator
  • Saturn
  • *****
  • Posts: 1059
    • ApolloHoax.net
Re: ASCII Characters
« Reply #14 on: January 28, 2013, 07:43:23 AM »
It is now changed to something that should be easily typed on western keyboards.

Thanks.
It suddenly struck me that that tiny pea, pretty and blue, was the Earth.
I put up my thumb and shut one eye, and my thumb blotted out the planet Earth.
I didn't feel like a giant. I felt very, very small.
- Neil Armstrong (1930-2012)