Kbase 20135: How Progress Manages Control Characters, Special Characters & Null Values
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/19/2008 |
|
Status: Unverified
GOAL:
How does Progress interpret the sequence ESCAPE?
GOAL:
How does Progress manage the NULL value, Special Characters, Control Characters and Control Sequences?
FACT(s) (Environment):
Progress 8.x
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
FIX:
Sometimes you must deal with situations where you need to use special character strings (ASCII, Control or Escape Sequences).
Question arise asking if Progress can store the special character NULL for some purpose, to do outputs to a printer, or to put it into a character string file.
1) Can Progress store the character NULL?
Progress does not recognize the NULL character. Internally, Progress uses the NULL character to terminate a character string End of File (EOF). Because of this you cannot store a NULL character in a field or variable, or send the NULL character to any device.
2) Is Progress able to store character NULL as Binary?
Progress does not have a binary type, so it is impossible to store character NULL as a binary, however you can store the binary value into a character, integer field, or variable.
ASCII(NULL) returns -1 and ASCII(EOF) returns -2.
3) How does Progress manage those control/escape characters?
Progress cannot store the NULL value but it can store it as its equivalent decimal (ASCII), octal or hexadecimal to send it to any output. This method is also valid for any control character or sequence. You must treat the (escape/control) character as you would a normal character string.
4) How does Progress interpret the sequence ESCAPE?
Under the DOS/Windows Platform, the escape character is represented by the tilde (~) character. The tilde (~) is an escape character that causes Progress to read the next character literally. A tilde followed by three octal digits represents a single character. Use it as a lead-in to enter the special characters.
Under the UNIX platform, the ESCAPE character is represented by backslash (\). The backslash (\) is an escape character for UNIX platforms only.
Based upon this information, you can decide the strategy you want to take to send your control sequences, and on the way you will represent them into a Progress database.