Try OpenEdge Now
skip to main content
Internationalizing Applications
Using Unicode : ABL constructs that support Unicode filenames
 

ABL constructs that support Unicode filenames

A subset of ABL constructs support the use of the full Unicode character set in filenames, including both ASCII and non-ASCII characters.
The following table lists those constructs and the associated elements that can contain any Unicode character. Windows natively stores filenames as Unicode (UTF-16), and for these constructs, the AVM converts filenames between Unicode and the code page set in the startup parameter -cpinternal. Most UNIX/Linux implementations support UTF-8 Unicode filenames. In both Windows and UNIX/Linux systems, the parameter -cpinternal should be set to UTF-8 to ensure that the AVM will be able to properly access files with Unicode names. For more information on -cpinternal, see OpenEdge Deployment: Startup Command and Parameter Reference.
Table 21. ABL constructs that support Unicode filenames
ABL construct
Elements that can accept Unicode values
ADD-SCHEMA-LOCATION
location
CONTEXT-HELP-FILE
This attribute can hold pathnames that contain Unicode characters.
COPY-LOB
FROM source-filename TO target-filename
DEFINE IMAGE
FILE name
DOS
command-token | VALUE ( expression )
FILE-NAME
When used with the FILE-INFO handle, this attribute can hold filenames that contain Unicode characters.
FILE-FULL-PATHNAME
This attribute can hold pathnames that contain Unicode characters.
FILE-PATHNAME
This attribute can hold pathnames that contain Unicode characters.
Framephrase, CONTEXT-HELP-FILE
help-file-name
GET-DROPPED-FILE
This method can return pathnames that contain Unicode characters.
Image phrase, FILE
name
INPUT FROM
opsys-file | VALUE ( expression )
OS-DIR (directory )
INPUT THROUGH
program-name VALUE ( expression )
LOAD (statement)
DIR directory
LOAD (handle method)
file
LoadControls
control-filename
LOAD-ICON
icon-filename
LOAD-IMAGE
filename
LOAD-MOUSE-POINTER
pointer-name
LOAD-PICTURE
image
LOAD-SMALL-ICON
smallicon-filename
OS-APPEND
source-filename | VALUE ( expression ) target-filename | VALUE ( expression )
OS-COMMAND
command-token | VALUE ( expression )
OS-COPY
source-filename | VALUE ( expression ) target-filename | VALUE ( expression )
OS-COMMAND
command-token | VALUE ( expression )
OS-CREATE-DIR
dirname | VALUE ( expression )
OS-DELETE
filename | VALUE ( expression )
OS-RENAME
source-filename | VALUE ( expression ) target-filename | VALUE ( expression )
OUTPUT THROUGH
program-name | VALUE ( expression )
OUTPUT TO
opsys-file | VALUE ( expression )
PATHNAME
This attribute can hold pathnames that contain Unicode characters.
PRINTER-NAME
This attribute can hold printer names that contain Unicode characters.
PROCEDURE
EXTERNAL " dllname"
READ-FILE
filename
READ-XML
file schema-location
READ-XMLSCEHMA
file
SAVE
file
SAVE-FILE
filename
SCHEMA-LOCATION
This attribute can hold values that contain Unicode characters.
SCHEMA-PATH
This attribute can hold pathnames that contain Unicode characters.
SEARCH
opsys-file
SET-INPUT-SOURCE
file
SET-OUTPUT-DESTINATION
file
SYSTEM-DIALOG-GET-DIR
character-field INITIAL-DIR directory-string
SYSTEM-DIALOG-GET-FILE
character-field INITIAL-DIR directory-string
SYSTEM-HELP
file-string
WRITE-XML
file schema-location
WRITE-XMLSCHEMA
file
XML-SCHEMA-PATH
This attribute can hold pathnames that contain Unicode characters.
The ABL constructs listed in the following table do not support the full Unicode character set. Some constructs have strict limits, as noted in the table, but the rest are limited according to the operating system. In Windows, they are restricted to characters from the code page set in the Language for non-Unicode Programs (which is found under Regional Settings in the Control Panel for Windows 7). A total of 256 characters can be used in Windows filenames, including non-ASCII characters, but the code page set in -cpinternal must match the code page selected in the Language for non-Unicode Programs. If your filenames contain Unicode characters outside of that code page, the AVM will not be able to access the file. In UNIX/Linux, the set of characters should be restricted to those available in the code page set in -cpinternal.
For both Windows and UNIX/Linux, -cpinternal must always be the same if a filename used with one of the constructs in the following table contains characters outside of ASCII. Restricting all filenames used with these constructs to ASCII characters only (unless a tighter restriction is noted) is the recommended practice.
Table 22. ABL constructs that only support restricted character sets
{ } (include)
CALL-NAME
CLASS1
COMPILE
CONNECT2
CREATE DATABASE3
INTERFACE4
LIBRARY5
LOG-MANAGER:LOGFILE-NAME
NEW6
PROMSGS
PROPATH
RCODE-INFO7
RUN
SAVE-CACHE
SESSION:BASE-ADE
USING8

1 Restricted to alphanumeric characters plus the following: # $ % & _

2 Restricted to alphanumeric characters only. Diacritical marks and the following characters are not permitted: \ " ‘ * ; | ? [ ] ( ) ! { } < > @ + = : ~

3 Restricted to alphanumeric characters only. Diacritical marks and the following characters are not permitted: \ " ‘ * ; | ? [ ] ( ) ! { } < > @ + = : ~

4 Restricted to alphanumeric characters plus the following: # $ % & _

5 Restricted to alphanumeric characters plus the following: # $ % & _

6 Restricted to alphanumeric characters plus the following: # $ % & _

7 Note that FILE-NAME, when used with the FILE-INFO handle, does support Unicode characters, but when FILE-NAME is used with RCODE-INFO, it does not.

8 Restricted to alphanumeric characters plus the following: # $ % & _