Results 1 to 19 of 19

Thread: ASCII table

  1. #1

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Resolved ASCII table

    Hello All,

    I need to display all the characters for ASCII values 0 to 255.

    If its possible to display those characters in listbox then that will be more helpful.

    Actually it should happen that w.r.t to ASCII code it should display respactive character into listbox.

    HTML Code:
    eg. 
    ASCII Value     Char. to be display
    65                  A
    146                Æ
    05                  ♣
    Note: Please see below attachment of ASCII table.
    Attached Images Attached Images  
    Last edited by shirishdawane; Sep 22nd, 2006 at 08:58 AM. Reason: Added reply to submit new problem....
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: ASCII table

    Just use the chr function and Print the values out to a file or load in a listbox or listview control.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: ASCII table

    Afaik you can see those characters by using Terminal font:
    VB Code:
    1. List1.Clear
    2.     List1.Font.Name = "Terminal"
    3.     For lngA = 1 To 255
    4.         List1.AddItem ChrW$(lngA)
    5.     Next lngA

  4. #4

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Re: ASCII table

    Quote Originally Posted by Merri
    Afaik you can see those characters by using Terminal font:
    VB Code:
    1. List1.Clear
    2.     List1.Font.Name = "Terminal"
    3.     For lngA = 1 To 255
    4.         List1.AddItem ChrW$(lngA)
    5.     Next lngA
    Thanx both of you for such a quick & informative reply..........

    please see attached exe of ASCII table but after comparing it with attached image so many characters its misprinting.I guess its because of font....
    I have used same font as mentioned by Merri
    VB Code:
    1. List1.Font.Name = "Terminal"

    can you resolve this problem.............Thanx in advance....................
    Attached Files Attached Files
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  5. #5
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: ASCII table

    Do you know which character set that is? Knowing it is ASCII is not enough, because ASCII can be so many different things. What you see in the listbox with Terminal font is the OEM character set (I guess that means it is the same as the most common DOS character set).

  6. #6

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Re: ASCII table

    So how shall I solve my problem.............
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  7. #7
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: ASCII table

    Humm, so, what is the actual problem? Do you need to show the specific characters from that table? What will be the use?

  8. #8

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Re: ASCII table

    Actually I have to implement this functionality in my official project that is why I am trying to do it for testing purpose.

    Customer send me standard ASCII characters image (attached image) for reference & they want in same format as mentioned in image.

    I hope now you can understand my problem............
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: ASCII table

    What font are you using? If you set the textbox font to Terminal, it'll show them the way you want. About the only character you can't produce is 9, HTab.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  10. #10
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: ASCII table

    So how shall I solve my problem.............
    Use Terminal Font and CHR$ not CHRW$

  11. #11

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Re: ASCII table

    Quote Originally Posted by brucevde
    Use Terminal Font and CHR$ not CHRW$
    Yes I have done changes as per told by you but no use because from 1 to 127 its printing correct then from 128 to 255 its misprinting characters as shown in attached jpg image.....

    I have attached code of my project...........please have a look on that tell me what changes are nned to be done now...............
    Attached Files Attached Files
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  12. #12
    New Member
    Join Date
    Jun 2006
    Location
    USA
    Posts
    9

    Re: ASCII table

    Looked at your attached code from post #11 and it showed a bunch of question marks (?) for some of the characters. When I changed "chrw$" to "chr$" (as suggested by post #10), then all of the characters appeared properly.

  13. #13
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: ASCII table

    I tried to find what is the actual character set but I just can't find that one. Until we really know what it is, there is no way we can get the correct characters.

    Terminal supports and shows up as OEM/DOS character set, which is not that character set we can see in the image you have provided.

    Some pages with various ASCII table charts
    http://jimprice.com/jim-asc.htm
    http://www.cdrummond.qc.ca/cegep/inf...iles/ascii.htm
    http://ascii-table.com/ascii-extended-mac-table.php
    http://www.italysoft.com/utility/con...scii-table.php (a close match here...)

    You can have fun yourself looking through all the nice pictures Google provides

  14. #14
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: ASCII table

    I found it! It is multilingual codepage PC-850 aka CP-850: http://www.nefec.org/UPM/spc850.htm

    I now know how to get the correct Unicode character codes (UTF-16) for the characters, but I don't (yet) know of any font that could be used to display the results correctly.


    Edit!
    Here you can find a Terminal font. Just install the font from New850.zip and then Terminal supports CP-850: http://www.uwe-sieber.de/dosfon_e.html

    I don't know how exactly the change triggered, though. Also some special letters appear to be missing, I'm not sure why. Probably the font doesn't support them.
    Last edited by Merri; Jun 26th, 2006 at 12:56 PM.

  15. #15
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: ASCII table

    It looks as if the original table, as shown in post 1, was generated using a character generator IC (2513?) I don't think that can be duplicated by any Windows font. close, yes, but not exactly - unless by making a character generator chip available to the software (which would require a plug-in board or USB device of some sort).

    Or maybe I'm wrong and MS has exactly duplicated the old chip in some code page.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  16. #16
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: ASCII table

    The problem is that there is no font to display all the characters. I can use MultiByteToWideChar to convert from codepage 850 to Unicode and each character gets unique Unicode code and I'm pretty sure they're "correct", but none of the fonts is able to display the exact wanted result for the special characters (ones that are used for style/design and not for information).

    In the other hand the font I found is able to show most of the characters pretty close to the wanted end result (and there is no need for character set conversion, just give 0-255), but seems to lack some of the special alphabets; not all of them, but still all too many.


    So it is kind of a dead end here: either use the additional font and install it with the installation of the program or then be happy with Windows' ability to convert the character set from codepage 850 to Unicode.

  17. #17

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Re: ASCII table

    Quote Originally Posted by Merri
    I found it! It is multilingual codepage PC-850 aka CP-850: http://www.nefec.org/UPM/spc850.htm

    I now know how to get the correct Unicode character codes (UTF-16) for the characters, but I don't (yet) know of any font that could be used to display the results correctly.


    Edit!
    Here you can find a Terminal font. Just install the font from New850.zip and then Terminal supports CP-850: http://www.uwe-sieber.de/dosfon_e.html

    I don't know how exactly the change triggered, though. Also some special letters appear to be missing, I'm not sure why. Probably the font doesn't support them.
    Cheersssssssssssss......................

    I have downloaded & installed CP-850 font on my machine & now its working fine as I wanted.........

    Guys, thanx a lot for ur valuable informations............
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  18. #18

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Re:ASCII table

    Hi All,


    We are facing following problems with MS Sans Serif Font:

    For a notepad if we set the font to MS Sans Serif,Bold,8 points and paste some ASCII characters such as ¹³²~ repeatedly some extra empty spaces are added with every paste.

    Same case is happening with textbox having Ms Sans Serif,Bold, 8 points font set.

    Why is it so?

    STEPS
    1. OPEN NOTEPAD
    2. SET FONT TO MS SANS SERIF,BOLD,8 POINTS.
    3. PASTE THE CHARACTER ¹³²~ REPEATEDLY.
    4. U WILL SEE BLANK SPACES ADDED AT THE END OF STRING.
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  19. #19
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: ASCII table

    Sorry, I couldn't replicate this problem. I tried both Alt + 132 character (ä) and Alt + 0132 („).

    This problem might be specific to the locale and country version of Windows you are using.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width