User`s guide
Database character sets and Java Encodings
12-2 Oracle Database Installation and Administration Guide
BS2000 PAM files in ascii can be created by transferring files (FTP) from an ascii
platform to BS2000 in binary mode.
The distinction between a native BS2000 file name and a POSIX file name is made by
the preceding slash ('/'). As a consequence, no relative path names are allowed for
POSIX file names.
However, there is one exception: when used within
dbms_java.loadjava
, relative path
names are preceded by the value of
ORACLE_HOME
in
ORAENV
file.
12.2 Database character sets and Java Encodings
As far as I/O is concerned, the Oracle JAVAVM uses the database character set as
system property
file.encoding
. Therefore the following Oracle/BS2000 database
character sets have been added to the list of supported Java encodings:
WE8BS2000
WE8BS2000E
EE8BS2000
CE8BS2000
CL8BS2000
WE8BS2000L5
These encodings are not known to any other Java implementation.
The system property
file.encoding
, however, does not apply to Java property files.
Property files always use the encoding 8859_1 (refer to Oracle Database SQLJ
Developer's Guide). The system property
file.encoding
is used when compiling a
source file. You can change this default by either using the following procedure or by
setting the encoding option of the procedure
dbms_java.loadjava
:
dbms_java.set_compiler_option('','encoding',...)
12.3 Java Demonstration Files
A simple Java demonstration program running in the server is shipped under:
$ORAC1120.JAVAVM.DEMO.HELLO.SQL
CREATE JAVA SOURCE
USING BFILE
.java, .sqlj BS2000 PAM
file or
POSIX
DB charset Execute
dbms_
java. set_
compiler_
option (' ',
'encoding',
'ISO8859-1')
CREATE JAVA SOURCE
AS
.sql Part of
statement
Session
character set
specified in
NLS_LANG
NLS_LANG
CALL DBMS_
JAVA.LOADJAVA
*, .jar, .zip POSIX DB charset Option
encoding in
loadjava call
java.io-package
* POSIX DB charset Depends on
the classes
used
Statement or API File type Place
Default
encoding
Encoding
modification