Author Topic: ASCII Table  (Read 5251 times)

TKasparek

  • Senior Community Member
  • Posts: 246
  • Hero Points: 29
ASCII Table
« on: August 27, 2014, 04:15:53 PM »
I'm curious where you pulled the provided ASCII table from. 127d and on seem off from the alt-numpad entries and this online table:

http://www.cdrummond.qc.ca/cegep/informat/Professeurs/Alain/files/ascii.htm

mwb1100

  • Senior Community Member
  • Posts: 156
  • Hero Points: 13
Re: ASCII Table
« Reply #1 on: August 27, 2014, 08:01:28 PM »
Hmm - this post encouraged me to start playing around with the ASCII table (which I guess is just a file named asciitab).  first I messed around with "View/Hex" and "View/Hex Line" to see what's in the file. I also started using the "File/Reload with Encoding..." menu to change encoding (which also immediately screwed up the line endings).  I *think* that the table displays best with encoding "Latin US (DOS-437)", but I'm not sure.

Ultimately after doing all that, I can no longer get the ASCII Table to load using "Tools/ASCII Table". I get an error that says "Record width option is not supported for UNICODE files".  This persists after a close/restart for SE (v19 Beta 1 x64 on Win7).

I can get it to open using "File/Open...", but it still doesn't display nicely because of the lack of line endings in the file or something.


« Last Edit: August 27, 2014, 10:09:52 PM by mwb1100 »

TKasparek

  • Senior Community Member
  • Posts: 246
  • Hero Points: 29
Re: ASCII Table
« Reply #2 on: August 27, 2014, 08:34:24 PM »
Huh, for some reason I had it in my head that the ASCII table was just a picture and not a really obvious text file... (face-palm). Makes more sense now but it seems the default for a text file should show symbols more along the path of their usual ASCII representation.

Either way, seems like something more useful could be provided here. Including some coloring...

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: ASCII Table
« Reply #3 on: August 28, 2014, 06:07:18 PM »
The ascii table is only useful if you're editing files that are SBCS/DBCS. For SlickEdit, that's typically source code files (.cpp, .java, etc.). It's not intended to be useful for Unicode files (i.e. utf-8/Utf-16 -- XML files).  It helps you know how characters <256 will display in your font and gives you hex and decimal values.

It's a record file that has no line endings. That way you can see what your font will display for 10 and 13 characters. You'll have to specify a record width of 66 to open this file. The GUI open dialog no longer has a record width option.  From the SlickEdit command line, "e +66 asciitab" will do the trick.

mwb1100

  • Senior Community Member
  • Posts: 156
  • Hero Points: 13
Re: ASCII Table
« Reply #4 on: August 28, 2014, 06:55:22 PM »
When I try to use "e +66 asciitab" with no other files open I get a messagebox and/or a popup in the bottom right corner that says "Record width option is not supported for UNICODE files". I had to use "e +66 +FTEXT asciitab" to get the file opened again (note that the help file says that "This is the default mode when no mode (either SBCS/DBCS or Unicode) is specified" so there's either a bug or the help is not quite correct). After doing that the "Tools/ASCII Table" menu item works again.

The ASCII Table display is not very pretty because the characters that should show up as vertical bars to separate the columns shows up as a superscript '3' (0xB3).  That's what I was trying to change by using the "File/Reopen with Encoding...".

There doesn't seem to be a way to specify the code page to use when opening a file from the command line.

I'm not sure how much value there is in solving whatever problems I ran into - I've never used SE's ASCII Table tool before and I'll probably continue to use what I always have in the rare occasion that I need an ASCII table.  Maybe I'll just patch the asciitab file so the superscript '3' (0xB3) characters are spaces or plain old ASCII vertical bars (0x7C).

Then again, it seems like TKasparek was maybe interested in having the high ASCII codes be able to display using a different code page.

TKasparek

  • Senior Community Member
  • Posts: 246
  • Hero Points: 29
Re: ASCII Table
« Reply #5 on: August 28, 2014, 08:21:38 PM »
Alright, to solve your problem with opening the ASCII file through the menu go to file->open (standard open dialog type) find the file asciitab, for line format select custom and specify record width of 66, then change the encoding to text, SBCS/DBCS mode and hit open. After this it will open correctly from the menu again. It did for me at least.

You were correct, I was originally thinking the intended purpose for this was to have a quick access chart to see the 'standard' 256 ASCII codes. I refer to an ASCII chart at least once a week and although it would be helpful and quicker to have a nicely formatted chart within SE it's not necessary. (Then again, how many features are really necessary... software is meant to be helpful). My link from the first post is saved in chrome and accessible to me when I need it. Not a big deal. Maybe something for the wishlist; like a separate window/tabbed version that I could group with my Projects/Search Results/ and Reference tabs would be fantastic... :)

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: ASCII Table
« Reply #6 on: August 28, 2014, 09:04:28 PM »
Alright, to solve your problem with opening the ASCII file through the menu go to file->open (standard open dialog type) find the file asciitab, for line format select custom and specify record width of 66, then change the encoding to text, SBCS/DBCS mode and hit open. After this it will open correctly from the menu again. It did for me at least.

You were correct, I was originally thinking the intended purpose for this was to have a quick access chart to see the 'standard' 256 ASCII codes. I refer to an ASCII chart at least once a week and although it would be helpful and quicker to have a nicely formatted chart within SE it's not necessary. (Then again, how many features are really necessary... software is meant to be helpful). My link from the first post is saved in chrome and accessible to me when I need it. Not a big deal. Maybe something for the wishlist; like a separate window/tabbed version that I could group with my Projects/Search Results/ and Reference tabs would be fantastic... :)

Thanks. I didn't realize "Custom" would allow a record width ;D That's handy.