User Tools

Site Tools


oem_set_international_string_support_.htm
Navigation:  Language Reference > 5 - Declaration Attributes > Variable and Entity Attributes >====== OEM (set international string support) ====== Previous pageReturn to chapter overviewNext page

 

OEM

blk2blue.jpg

The OEM attribute (PROP:OEM) specifies that the FILE on which it is placed contains non-English language string data that was stored by a DOS based program or needs to be read by a DOS based program. These strings are automatically translated from the OEM ASCII character set data contained in the file to the ANSI character set for display in Windows. All string data in the record is automatically translated from the ANSI character set to the OEM ASCII character set before the record is written to disk.

The specific OEM ASCII character set used for the translation comes from the DOS code page loaded by the country.SYS file. This makes the data file specific to the language used for that code page, and means the data may not be useable on a computer with a different code page loaded. This attribute may not be supported by all file systems; consult the specific file driver's documentation.

Example:

Cust   FILE,DRIVER('TopSpeed'),PRE(Cus),OEM  !Contains international strings

CustKey  KEY(Cus:Name)

Record   RECORD

Name      STRING(20)

        END

      END

Screen WINDOW('Window')

       ENTRY(@S20),USE(Cus:Name)

       BUTTON('&OK'),USE(?Ok),DEFAULT

       BUTTON('&Cancel'),USE(?Cancel)

      END

CODE

OPEN(Cust)             !Open Cust file

SET(Cust)

NEXT(Cust)             !Get record, ASCII strings are automatically

                       ! translated to ANSI character set

OPEN(Screen)           !Open window and display ANSI data

ACCEPT

 CASE FIELD()

 OF ?Ok

  CASE EVENT()

  OF EVENT:Accepted

   PUT(Cust)           !Put record, ANSIstrings are automatically

                       ! translated to the OEM ASCII character set

                       ! per the loaded DOS code page

   BREAK

  END

 END

END

CLOSE(Screen)

CLOSE(Cust)

See Also:

Environment Files

LOCALE

oem_set_international_string_support_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)