cagorskij Posted February 10, 2023 Posted February 10, 2023 Hello, this is my first post here & I'm very new to autolisp, so forgive me if I am omitting some important details. I'm trying to find out why (maybe) strcat is conjuring an "Â" that doesn't appear to be in any of the variables before it. It is appearing after (itoa intd) & before "°". (setq nbrg2 (strcat (itoa intd) "°" mint "'" sec (chr 34))) 225°00'00" is output for example. I think it has something to do with the ° symbol but I'm not sure why. (chr 248) will output ø instead of °. I have found out that using "\260" will work and output the ° symbol. If anyone could explain what I should be doing with special characters or point me to some learning resource that would be greatly appreciated ^^ Quote
mhupp Posted February 10, 2023 Posted February 10, 2023 I think it has to do with the font your using. not all character numbers are the same in each font. to find the correct number use the following (ascii "°") mine its 176 so then use that number with (chr (setq nbrg2 (strcat (itoa intd) (chr 176) mint "'" sec (chr 34))) This will display all your character numbers of the current font. https://www.cadtutor.net/forum/topic/75383-text-ascii/?do=findComment&comment=596047 2 Quote
1958 Posted February 10, 2023 Posted February 10, 2023 (setq nbrg2 (strcat (itoa intd) "%%D" mint "'" sec (chr 34))) Quote
BIGAL Posted February 10, 2023 Posted February 10, 2023 Inside Windows Fonts you can check each character to find its character code. As mentioned some fonts have different characters for same number. 2 Quote
cagorskij Posted February 15, 2023 Author Posted February 15, 2023 Thank you all for the solutions and explanations Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.