11-23-2022, 09:58 AM
(11-23-2022, 05:19 AM)SMcNeill Wrote: You have the normal character set that you're used to using and seeing all the time. _MAPCUNICODE only overwrites the characters that you tell it to -- nothing more.
So, in your case where you mapped the copyright symbol to chr$(0), *ONLY* chr$(0) changed. All the rest of your ASCII codes are exactly the same as they've always been.
If you just need a quick "swap out" for a brief moment to display one particular character, let me suggest this style trick:
old_code = _MAPUNICODE(ASCII_position) 'get the unicode value of your old ascii position
_MAPUNICODE new_unicode_value TO ASCII_position 'swap it out with the new unicode value you need
'do stuff with it
_MAPUNICODE(ASCII_position) = old_code 'swap it back to the old value
For example:
old_code = _MAPUNICODE(1) 'store whatever the ASCII character is for that cute little smiley face
_MAPUNICODE 169 TO 1 'your copyright symbol is now chr$(1), and our smiley face is gone...
PRINT CHR$(1) 'print that copyright symbol
_MAPUNICODE old_code TO 1 'map that old code value back, so CHR$(1) is our heroic smiley face once more!
thank you very much for this small but necessary help all of you.
Gaslouk.