Sign in to follow this  
Followers 0
greenmachine

ASCII limit in Chr() function?

4 posts in this topic

I was trying to create a button with an up arrow (hex: 0x25B2, or dec: 9650), and the Chr() function wouldn't print the correct character. Instead, it printed a superscript 2, like you would see on x squared. A superscript 2 is hex code 0xB2, meaning that the Chr() function missed the first portion of the code (the 25). I'm not sure what's up with that, but I was wondering if anyone knew of a way to fix that, or something similar. Or is there a limit to how big the ascii code number can be?

Share this post


Link to post
Share on other sites



Well, by definition, ASCII is only 256 characters and so that pretty much answers the question right there.

Share this post


Link to post
Share on other sites

In fact, characters 128 to 255 are the "Extended ASCII Character set"

I'm assuming you want a GUI; try the Wingdings font:

GuiCreate("Really Lazy Example")
GUICtrlCreateButton("ÙÝáéñ", 10, 10, 200, 200)
GuiCtrlSetFont(-1, 24, 800, 0, "Wingdings")
GuiSetState()
Sleep(5000)

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

I knew something was wrong. You were both right, and ascii wasn't what I was looking at. I just assumed the unicode would work for ascii, and it didn't. Turns out Wingdings 3 had the characters I was looking for. Thanks for reminding me about fonts CyberSlug.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0