Progress
Internationalization Guide
Progress 4GL
Table A–5 describes the Progress 4GL elements particularly useful for internationalizing and localizing applications.
Table A–6 describes the 4GL elements that support multi-byte characters.
Table A–6: 4GL Elements That Support Multi-byte Characters 4GL Element Description APPLY Statement Performs the function of a specified key. The expression you APPLY can contain multi-byte characters. ASC Function For a double-byte character, returns a value greater than 255 and less than 65536.For a multi-byte character, returns a value up to 1571291 (HEX: 0xEFBFBF). BEGINS Operator Tests a character expression to see whether it begins with a second character expression. Both expressions can contain multi-byte characters. CAPS Function Changes any lowercase letters in a character string to uppercase. Any double-byte characters in the string are not changed. CHR Function For a value greater than 255 and less than 65536, checks for a lead-byte value. If the lead byte is valid, Progress creates and returns a double-byte character.Returns a character if the integer value you specify is within the range of 0 to 15712191. The function returns a null string if the integer value is outside this range, or if the value does not correspond to valid lead bytes or trail bytes. ENCODE Function Encodes a source character string and returns the encoded character string result. The source string can contain multi-byte characters.NOTE: If the ENCODE function processes a string under one code page and then processes the same string under a different code page, the results might not match. For more information, see the Progress Language Reference . ENTRY Function Returns a character string entry from a character-delimited list based on an integer position. The string can contain multi-byte characters since ENTRY determines the location based on a unit of measure in characters. ENTRY Statement Sets an element in a character-delimited list of strings to a value. All strings and character separators can contain multi-byte characters. FILL Function Generates a character string made up of a character string repeated a number of times. Both strings can contain multi-byte characters. INDEX Function Returns an integer that indicates the character position of the target string within the source string. The strings can contain multi-byte characters. IS–LEAD–BYTE Function Returns TRUE if the first byte of a string is valid as a lead byte of a multi-byte character. It returns FALSE if the first byte of a string is not valid as a lead byte. LASTKEY Function Returns the integer code of the most recent key sequence returned from the keyboard buffer. A key sequence is the set of keystrokes necessary to send one character or function key to the application. The LASTKEY values are available only after the Input Method Editor places the data in the keyboard buffer. LC Function Changes any uppercase letters in a character string to lowercase. Any double-byte characters in the string are not changed. LEFT–TRIM Function Removes specified leading characters in a character string. The string and trimmed characters can contain multi-byte characters. LENGTH Function Returns the number of characters or bytes in a string.
The type option selects the unit for length. You can choose CHARACTER, COLUMN, or RAW (for bytes). LOOKUP Function Returns an integer that indicates the position of an expression in a list. It returns a 0 if the expression is not in the list. The list, expression, and delimiter can contain multi-byte characters. MATCHES Operator Compares a character expression to a pattern and returns a TRUE value if the expression satisfies the pattern criteria. The expression and pattern can contain multi-byte characters. NUM–ENTRIES Function Returns the number of items in a character-delimited list of strings. All strings can contain multi-byte characters. OVERLAY Statement Overlays a character expression in a field or variable starting at a given position, and optionally for a given length. The type option selects the unit for length and position. You can choose CHARACTER, RAW (for bytes), or COLUMN. R–INDEX Function Returns an integer that indicates the position of the target string within the source string. The search is performed right to left. Both strings can contain multi-byte characters. READKEY Statement Reads one key sequence1 from an input source and sets the value of READKEY to the keycode of that key sequence. READKEY and LASTKEY values are available only after the Input Method Editor places the data in the keyboard buffer. REPLACE Function Lets you replace a substring with another substring. Both substrings can contain multi-byte characters. RIGHT–TRIM Function Removes specified trailing characters from a character string. The string and trimmed characters can contain multi-byte characters. SEARCH Function Searches the directories and libraries defined in the PROPATH environment variable for a file. The opsys-file can contain multi-byte characters. STRING Function Converts a value of any data type in source into a character value. The source can contain multi-byte characters. SUBSTITUTE Function Returns a character string that is made up of a base string plus substitutes arguments in the string. The base string and arguments can contain multi-byte characters. SUBSTRING Function Extracts a position of a character string from a field or variable. The type option selects the units for length and position. You can choose CHARACTER, RAW (for bytes), COLUMN, or FIXED.The FIXED type specifies that the maximum length is measured in bytes and the position in characters. If the last byte or bytes represent part of, but not all of, a multi-byte character, these bytes are excluded. SUBSTRING Statement Replaces characters in a field or variable with an expression you specify. You can replace the lead bytes or trail byte of the source string. The type option selects the unit for length and position. You can choose CHARACTER, FIXED, COLUMN, or RAW (for bytes).With the FIXED option, if the last byte or bytes represent part of, but not all of, a multi-byte character, these bytes are excluded. TRIM Function Removes leading and trailing single-byte spaces in a character string. The string and trimmed characters can contain multi-byte characters.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |