Jump to content

Photo

Extended ASCII in Strings

Report String Editor ASCII Extended Languages Letters Europe

  • Please log in to reply
No replies to this topic

#1 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 26 August 2015 - 08:16 PM

While playing with some Extended ASCII in ZScript, I thought I would try to enter a few characters into the ZQ String Table, and check if they were preserved. Anyone who have ever attempted to type an 'Extended ASCII' character such as '£', will know that ZC displays it as a blank space, because ZC has no internal interpretation of the symbols.

 

What you may not know, is that you can use these characters, typed from your keyboard, to write ZScript strings, handled by Tilefonts (e.g. Tango.zh).

 

I was curious if the values were preserved, if I used an internal (editor) string, and then utilised Game->GetMessage() to copy it to a buffer.

 

Unlike ZScript, which will remember the numeric literal associated with the characters that you type, ZQuest's String Editor, will not. Instead, the editor substitutes a blank space character (possibly char 127, although I didn't check, else char 32), and internal strings copied to a buffer use the replacement character.

 

Thus, if you want to use a Tilefont with extended chars (e.g. for German), you must use ZScript strings, declared in your scripts, and you cannot rely on GetMessage() to handle this; if you ordinarily do that as a shortcut.





Also tagged with one or more of these keywords: Report, String, Editor, ASCII, Extended, Languages, Letters, Europe

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users