Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
ILF Callable Unicode Engine Functions | ||||||||
Line: 208 to 201 | ||||||||
Note that your target field should be a UTF-32 field with the same number of characters as your source field. You can use a RAW alpha, but it must be 4 times the number of characters in the source field, plus 1, in bytes. For example, to convert TEMP 8k (8192 characters), your target RAW alpha field must be (4*8192)+1 = 32769 bytes or larger.
UC_ENUMERATE_CNV | ||||||||
Added: | ||||||||
> > | THIS IS WRONG, see the 0-app routine .ENV GET ENCODINGS for current usage. | |||||||
Returns the name of an encoding which can be specified calling UC_TO_UCODE or UT_FROM_UCODE. To obtain the name of each encoding supported by the ICU library, initialize a uint32 (---AI for example) to 0, call UC_ENUMERATE_CNV, save the name returned in the target argument, increment, the uint32 and repeat until the CALL statement sets the next T/F flag to F. Arguments: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
ILF Callable Unicode Engine Functions | ||||||||
Line: 33 to 34 | ||||||||
Arguments:
| ||||||||
Added: | ||||||||
> > |
| |||||||
NOTE: length is returned in --- RETURN CODE, the T/F flag returned by this call is meaningless Example: | ||||||||
Line: 36 to 38 | ||||||||
NOTE: length is returned in --- RETURN CODE, the T/F flag returned by this call is meaningless Example: | ||||||||
Added: | ||||||||
> > | ||||||||
SET TST WORK UCODE 4096 = ABC123XYZ PASS TST WORK UCODE 4096 FIELD SHARE? N | ||||||||
Added: | ||||||||
> > | PASS --- XI FIELD SHARE? N | |||||||
CALL .UC_LEN RESIDENT? N END? N FAIL 0
*
| ||||||||
Line: 53 to 57 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
NOTE: you may safely pass the same field for both target and source. Example: | ||||||||
Line: 61 to 67 | ||||||||
PASS TST WORK UCODE 32 FIELD SHARE? N PASS en FIELD SHARE? N PASS --- AI FIELD SHARE? Y | ||||||||
Added: | ||||||||
> > | PASS --- LI FIELD SHARE? N | |||||||
CALL .UC_UCASE RESIDENT? N END? N FAIL 0
*
| ||||||||
Line: 75 to 82 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
NOTE: you may safely pass the same field for both target and source. Example: | ||||||||
Line: 84 to 93 | ||||||||
PASS TST WORK UCODE 32 FIELD SHARE? N PASS en FIELD SHARE? N PASS --- AI FIELD SHARE? Y | ||||||||
Added: | ||||||||
> > | PASS --- LI FIELD SHARE? N | |||||||
CALL .UC_LCASE RESIDENT? N END? N FAIL 0
*
| ||||||||
Line: 99 to 109 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
NOTE: you may safely pass the same field for both target and source, Example: | ||||||||
Line: 107 to 119 | ||||||||
PASS TST WORK UCODE 32 FIELD SHARE? N PASS en FIELD SHARE? N PASS --- AI FIELD SHARE? Y | ||||||||
Changed: | ||||||||
< < | CALL .UC_LCASE RESIDENT? N END? N FAIL 0 | |||||||
> > | PASS --- LI FIELD SHARE? N CALL .UC_TCASE RESIDENT? N END? N FAIL 0 | |||||||
*
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
ILF Callable Unicode Engine Functions | ||||||||
Line: 138 to 133 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
ILF Callable Unicode Engine Functions | ||||||||
Line: 184 to 184 | ||||||||
| ||||||||
Changed: | ||||||||
< < | PASS TST WORK UCODE 4096 FIELD SHARE? Y PASS --- TEMP 32K FIELD SHARE? Y | |||||||
> > | PASS --- TEMP 32K FIELD SHARE? Y PASS TST WORK RAW 32K FIELD SHARE? Y | |||||||
PASS UTF-16LE FIELD SHARE? N PASS ESCAPE FIELD SHARE? N PASS DECIMAL FIELD SHARE? N | ||||||||
Line: 193 to 193 | ||||||||
PASS --- LI FIELD SHARE? Y CALL .UC_TO_UCODE RESIDENT? N END? N FAIL 0 * | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 208 to 208 | ||||||||
Example:
LABEL :GET NEXT | ||||||||
Changed: | ||||||||
< < | PASS --- TEMP 80 FIELD SHARE? Y | |||||||
> > | PASS --- WORK RAW 132 FIELD SHARE? Y | |||||||
PASS --- AI FIELD SHARE? N CALL .UC_ENUMERATE_CNV RESIDENT? N END? N FAIL 0 * | ||||||||
Line: 229 to 229 | ||||||||
Example:
SET --- CI = 8364 | ||||||||
Changed: | ||||||||
< < | PASS --- TEMP 32 FIELD SHARE? Y | |||||||
> > | PASS --- WORK RAW 30 FIELD SHARE? Y | |||||||
PASS --- CI FIELD SHARE? Y PASS --- AI FIELD SHARE? Y CALL .UC_CHAR_NAME RESIDENT? N END? N FAIL 0 * | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
* | ||||||||
Line: 270 to 270 | ||||||||
PASS SILLY NAME FIELD SHARE? N PASS --- AI FIELD SHARE? Y CALL .UC_CHAR_BY_NAME RESIDENT? N END? N FAIL 0 | ||||||||
Changed: | ||||||||
< < | F PASS --- TEMP 32 FIELD SHARE? Y | |||||||
> > | F PASS --- WORK RAW 32 FIELD SHARE? Y | |||||||
F PASS --- AI FIELD SHARE? N F CALL .UC_ERRORCODE RESIDENT?N END? N FAIL 0 * | ||||||||
Changed: | ||||||||
< < | * --- TEMP 32 contains "U_ILLEGAL_CHAR_FOUND" | |||||||
> > | * --- WORK RAW 32 contains "U_ILLEGAL_CHAR_FOUND" | |||||||
* |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
ILF Callable Unicode Engine Functions | ||||||||
Line: 124 to 129 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
You can use "action" to control the behavior of this function if a conversion error occurs (in this function, an error occurs when a UTF-32 character cannot be transcoded into the specified encoding). "action" can be one of the following:
| ||||||||
Line: 133 to 139 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Example: | ||||||||
Added: | ||||||||
> > | ||||||||
SET TST WORK UCODE 32 = This is a test * PASS --- TEMP 32 FIELD SHARE? Y | ||||||||
Line: 144 to 151 | ||||||||
PASS ESCAPE FIELD SHARE? N PASS C FIELD SHARE? N PASS --- SI FIELD SHARE? Y | ||||||||
Added: | ||||||||
> > | PASS --- LI FIELD SHARE? Y | |||||||
CALL .UC_FROM_UCODE RESIDENT? N END? N FAIL 0
*
| ||||||||
Line: 162 to 170 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
You can use "action" to control the behavior of this function if a conversion error occurs (in this function, an error occurs when a codepage character cannot be transcoded into UTF-32). "action" can be one of the following:
| ||||||||
Line: 171 to 180 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Example: | ||||||||
Added: | ||||||||
> > | ||||||||
PASS TST WORK UCODE 4096 FIELD SHARE? Y PASS --- TEMP 32K FIELD SHARE? Y PASS UTF-16LE FIELD SHARE? N | ||||||||
Line: 180 to 190 | ||||||||
PASS ESCAPE FIELD SHARE? N PASS DECIMAL FIELD SHARE? N PASS --- SI FIELD SHARE? Y | ||||||||
Added: | ||||||||
> > | PASS --- LI FIELD SHARE? Y | |||||||
CALL .UC_TO_UCODE RESIDENT? N END? N FAIL 0
*
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
ILF Callable Unicode Engine Functions | ||||||||
Line: 186 to 186 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Note that your target field should be a UTF-32 field with the same number of characters as your source field. | |||||||
> > | Note that your target field should be a UTF-32 field with the same number of characters as your source field. You can use a RAW alpha, but it must be 4 times the number of characters in the source field, plus 1, in bytes. For example, to convert TEMP 8k (8192 characters), your target RAW alpha field must be (4*8192)+1 = 32769 bytes or larger. | |||||||
UC_ENUMERATE_CNVReturns the name of an encoding which can be specified calling UC_TO_UCODE or UT_FROM_UCODE. To obtain the name of each encoding supported by the ICU library, initialize a uint32 (---AI for example) to 0, call UC_ENUMERATE_CNV, save the name returned in the target argument, increment, the uint32 and repeat until the CALL statement sets the next T/F flag to F. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
ILF Callable Unicode Engine Functions | ||||||||
Line: 157 to 150 | ||||||||
* | ||||||||
Added: | ||||||||
> > | Note that your target field should be a RAW alpha 4 times the size (in characters) of your UTF-32 field. | |||||||
UC_TO_UCODEConverts a string from the specified encoding to UTF-32. | ||||||||
Line: 194 to 186 | ||||||||
| ||||||||
Added: | ||||||||
> > | Note that your target field should be a UTF-32 field with the same number of characters as your source field. | |||||||
UC_ENUMERATE_CNVReturns the name of an encoding which can be specified calling UC_TO_UCODE or UT_FROM_UCODE. To obtain the name of each encoding supported by the ICU library, initialize a uint32 (---AI for example) to 0, call UC_ENUMERATE_CNV, save the name returned in the target argument, increment, the uint32 and repeat until the CALL statement sets the next T/F flag to F. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < | ILF Callable Unicode Engine FUnctions | |||||||
> > | ILF Callable Unicode Engine Functions | |||||||
Overview |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
ILF Callable Unicode Engine FUnctionsOverviewUC_STRCASECMPPerforms a case-insensitive comparison of two UTF-32 values, returning 0 if the strings should be considered equal, a negative number if the first value is "less than" the second value, and a positive number if the first value is "greater than" the second value. Arguments:
SET TST WORK UCODE 64 X 16 001 = ABC123 SET TST WORK UCODE 64 X 16 002 = Abc1234 * PASS --- AI FIELD SHARE? Y PASS TST WORK UCODE 64 X 16 001 FIELD SHARE? N PASS TST WORK UCODE 64 X 16 002 FIELD SHARE? N PASS --- BI FIELD SHARE? Y CALL .UC_STRCASECMP RESIDENT? N END? N FAIL 0 * * --- AI contains a negative number * UC_LENReturns the number of characters (not bytes) in the given string, minus trailing spaces. Arguments:
SET TST WORK UCODE 4096 = ABC123XYZ PASS TST WORK UCODE 4096 FIELD SHARE? N CALL .UC_LEN RESIDENT? N END? N FAIL 0 * * --- RETURN CODE is set to 9 * UC_UCASEConverts given UTF-32 string to upper-case according to the specified locale. Arguments:
SET TST WORK UCODE 32 = abc123XYZmnop PASS TST WORK UCODE 4096 FIELD SHARE? Y PASS TST WORK UCODE 32 FIELD SHARE? N PASS en FIELD SHARE? N PASS --- AI FIELD SHARE? Y CALL .UC_UCASE RESIDENT? N END? N FAIL 0 * * WORK UCODE 4096 contains ABC123XYZNMOP * UC_LCASEConverts given UTF-32 string to lower-case according to the specified locale. Arguments:
SET TST WORK UCODE 32 = abc123XYZmnop PASS TST WORK UCODE 4096 FIELD SHARE? Y PASS TST WORK UCODE 32 FIELD SHARE? N PASS en FIELD SHARE? N PASS --- AI FIELD SHARE? Y CALL .UC_LCASE RESIDENT? N END? N FAIL 0 * * WORK UCODE 4096 contains abc123xyzmnop * UC_TCASEConverts given UTF-32 string to title-case according to the specified locale. Arguments:
SET TST WORK UCODE 32 = This is a test PASS TST WORK UCODE 4096 FIELD SHARE? Y PASS TST WORK UCODE 32 FIELD SHARE? N PASS en FIELD SHARE? N PASS --- AI FIELD SHARE? Y CALL .UC_LCASE RESIDENT? N END? N FAIL 0 * * WORK UCODE 4096 contains This Is A Test * UC_FROM_UCODEConverts the given string from UTF-32 encoding to the specified encoding Arguments:
SET TST WORK UCODE 32 = This is a test * PASS --- TEMP 32 FIELD SHARE? Y PASS TST WORK UCODE 32 FIELD SHARE? Y PASS UTF-8 FIELD SHARE? N PASS ESCAPE FIELD SHARE? N PASS C FIELD SHARE? N PASS --- SI FIELD SHARE? Y CALL .UC_FROM_UCODE RESIDENT? N END? N FAIL 0 * * --- TEMP 32 contains "This is a test" in UTF-8 encoding * UC_TO_UCODEConverts a string from the specified encoding to UTF-32. Arguments:
PASS TST WORK UCODE 4096 FIELD SHARE? Y PASS --- TEMP 32K FIELD SHARE? Y PASS UTF-16LE FIELD SHARE? N PASS ESCAPE FIELD SHARE? N PASS DECIMAL FIELD SHARE? N PASS --- SI FIELD SHARE? Y CALL .UC_TO_UCODE RESIDENT? N END? N FAIL 0 * * WORK UCODE 4096 contains UTF-32 version of --- TEMP 32K * (which was encoded in UTF-16LE form) UC_ENUMERATE_CNVReturns the name of an encoding which can be specified calling UC_TO_UCODE or UT_FROM_UCODE. To obtain the name of each encoding supported by the ICU library, initialize a uint32 (---AI for example) to 0, call UC_ENUMERATE_CNV, save the name returned in the target argument, increment, the uint32 and repeat until the CALL statement sets the next T/F flag to F. Arguments:
LABEL :GET NEXT PASS --- TEMP 80 FIELD SHARE? Y PASS --- AI FIELD SHARE? N CALL .UC_ENUMERATE_CNV RESIDENT? N END? N FAIL 0 * * --- TEMP 80 contains the name of an encoding * COMPUTE --- AI + 1 T GOTO :GET NEXT UC_CHAR_NAMEReturns the name of the first character in a UTF-32 string. Arguments:
SET --- CI = 8364 PASS --- TEMP 32 FIELD SHARE? Y PASS --- CI FIELD SHARE? Y PASS --- AI FIELD SHARE? Y CALL .UC_CHAR_NAME RESIDENT? N END? N FAIL 0 * * --- TEMP 32 contains "EURO SIGN" * UC_CHAR_BY_NAMEReturns the character whose name is specified. Arguments:
PASS TST WORK UCODE 1 FIELD SHARE? Y PASS COMMERCIAL AT FIELD SHARE? N PASS --- AI FIELD SHARE? Y CALL .UC_CHAR_BY_NAME RESIDENT? N END? N FAIL 0 * * WORK UCODE 1 contains "@" * UC_ERRORCODEReturns a programmer-friendly interpretation of an ICU error code (note: this does not return a message suitable for an end-user). Arguments:
PASS TST WORK UCODE 1 FIELD SHARE? Y PASS SILLY NAME FIELD SHARE? N PASS --- AI FIELD SHARE? Y CALL .UC_CHAR_BY_NAME RESIDENT? N END? N FAIL 0 F PASS --- TEMP 32 FIELD SHARE? Y F PASS --- AI FIELD SHARE? N F CALL .UC_ERRORCODE RESIDENT?N END? N FAIL 0 * * --- TEMP 32 contains "U_ILLEGAL_CHAR_FOUND" * Test PlanDo the above callable functions produce the results stated?
Bugs |