Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Extended ASCII characters

Author
Message
Jaq
19
Years of Service
User Offline
Joined: 18th Jun 2007
Location:
Posted: 22nd May 2010 12:40 Edited at: 22nd May 2010 17:40
I'm working on something reminiscent of an old DOS era game, but can't seem to get the IDE to accept input of DOS ASCII characters for menu borders and whatnot.

Example:

alt-201 should output "╔" for an upper left double border..

But instead I only get "+".

Is this a limitation of the IDE or am I missing something simple? I've tried copying the correct characters from notepad but they revert to the incorrect characters upon pasting.. any ideas?

edit: The same thing happens in the default editor and in BlueIDE.
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 22nd May 2010 17:43 Edited at: 22nd May 2010 22:23
This is a limitation of the IDE if you can't change the charset of the editor.

In DBP you will need to use the extra parameter for set text font: OEM_CHARSET 255

So you will need to type something along like


Cheers!
Sven B

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 22nd May 2010 17:51 Edited at: 22nd May 2010 17:52
I'm guessing someone (Jaq) asked a question and Sven answer it, but for some reason I can't see the post, anyone else?

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Jaq
19
Years of Service
User Offline
Joined: 18th Jun 2007
Location:
Posted: 22nd May 2010 18:08
I edited the original post - it says new members must be approved..

Anyway, Sven's code does work well for inputting individual characters by ASCII code, but unfortunately the IDE is still being picky about doing it straight from print statements..

i.e. print "╔════════╗" for the top section of a small menu.

the IDE will instead display print "++++++++++"
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 22nd May 2010 22:22 Edited at: 22nd May 2010 22:22
Well I would suggest something along the lines of a function that "parses" a border:



Of course I'm just playing with it here so you might want to use a different kind of parser.

Cheers!
Sven B

Login to post a reply

Server time is: 2026-07-25 16:19:29
Your offset time is: 2026-07-25 16:19:29