Syntax Rules for Describing the Data Stream
<code_page_spec> ::= CODEPAGE [<valCODEPAGE_NAME>]
valCODEPAGE_NAME |
Name
of code page If you specify an empty value, the code page is reset to the default value. |
If you convert CHAR data from ASCII to UCS2, you determine which code page is used (see also: standard_code_spec).
To make user-defined code pages accessible to the Loader for conversions, you first have to load these code pages into the system table CODEPAGE. To do this, proceed as follows:
1. In the directory <dependent_path>/env, create a file with the name <valCODEPAGE_NAME>.txt. This file has to be formatted in the same was as the files that are provided by the Unicode consortium at ftp://ftp.unicode.org/Public/MAPPINGS/.
File ISO-8859-8.txt
# Name:
ISO/IEC 8859-8:1999 to Unicode
# Unicode version: 3.0
# Table version: 1.1
# Table format: Format A
# Date:
2000-Jan-03
# Authors:
Ken Whistler kenw@sybase.com
#
# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved.
#
# This file is provided as-is by Unicode, Inc. (The
Unicode Consortium).
# No claims are made as to fitness for any
particular purpose. No
# warranties of any kind are expressed or
implied. The recipient
# agrees to determine applicability of information
provided. If this
# file has been provided on optical media by
Unicode, Inc., the sole
# remedy for any claim will be exchange of defective
media within 90
# days of receipt.
#
# Unicode, Inc. hereby grants the right to freely
use the information
# supplied in this file in the creation of products
supporting the
# Unicode Standard, and to make copies of this file
in any form for
# internal or external distribution as long as this
notice remains
# attached.
…
# Format:
Three tab-separated columns
# Column #1 is the ISO/IEC 8859-8 code (in hex as
0xXX)
# Column #2 is the Unicode (in hex as 0xXXXX)
# Column #3 the Unicode name (follows a comment
sign, '#')
…
0x00 0x0000 #
NULL
0x01 0x0001 #
START OF
HEADING
0x02 0x0002 #
START OF
TEXT
0x03 0x0003 #
END OF
TEXT
0x04 0x0004 #
END OF
TRANSMISSION
0x05 0x0005 #
ENQUIRY
0x06 0x0006 #
ACKNOWLEDGE
0x07 0x0007 #
BELL
0x08 0x0008 #
BACKSPACE
0x09 0x0009 #
HORIZONTAL
TABULATION
0x0A 0x000A #
LINE
FEED
2.
Load the code
page into the system table CODEPAGE.
Use the SET command to do
so. When processing the SET command SET
CODEPAGE <valCODEPAGE_NAME>, the Loader first tries to find the specified code
page in the system table CODEPAGE. If the table does not contain the
code page, the SAP DB Loader tries to find the corresponding file <valCODEPAGE_NAME>.txt.
If this file exists,
it is read, and the conversion table is entered in the system table
CODEPAGE.
If the file is not
found, and if the code page is not contained in the system table, the Loader
stops processing the SET command and displays an error message.
If the SET command is processed successfully, the user-defined code page is available in the system table CODEPAGE.
The Loader reads the conversion table from the system table CODEPAGE. All subsequent conversions of the CHAR data from ASCII to UCS2 are performed by using this conversion table.
See also: