This appendix discusses how you can override the default characters allowed by XEngine in an Oracle B2B instance.
The appendix includes the following sections:
XEngine helps Oracle B2B to translate EDI, X12, and HL7 documents from the Native to XML and XML to Native formats.
The system or default characters allowed by XEngine for a particular document standard is located at $ORACLE_HOME/soa/thirdparty/soa-infra/edifecs/XEngine/config/charsets. For example, for EDI X12, the filename is x12.cs, and for EDI EDIFACT, the filename is edifact.cs.
It is recommended that you should not edit any of these XEngine provided files, but use Oracle Document Editor instead to override the default characters used in the system.
To override the default characters used in the system, you need to use Oracle Document Editor to create a user.cs file.
If the user.cs file is not created, you will encounter the following error message:
Error Brief : A data element contains characters not listed in the allowed character set.
To create the user.cs file:
In Oracle Document Editor, under the Tools tab, access Character Set Registry.
Select the Standard/Version/DocType whose characters you want to override and click the Duplicate button to create a duplicate of the Standard/Version/DocType.
Edit the content of this new entry with additional characters (such as ÿ
in EDI X12 V4010 850), and then export this new entry to a file called user.cs.
To edit the user.cs file:
This gives an example of how to override a non-traditional character.
As an example, insert the character ÿ
into a 850.xml XDATA file. This character, by default, is not supported by the default x12.cs file. You need to follow the steps listed in Using XEngine to Override Characters to generate a user.cs and place it in $ORACLE_HOME/soa/thirdparty/soa-infra/edifecs/Common.
For the outbound case when using AQ, ensure that the encoding=ISO-8859-1
is used in the property file so that the proper encoding is used to preserve the ÿ
character in the transmission to the database. You can find out if this is done correctly by viewing the Application Message payload in the Oracle B2B UI and checking whether the character ÿ
is displayed properly, and not as some random character.
With validation turned on and user.cs file in place, the 850.xml will be processed correctly. Without the user.cs in place, you will encounter the following error message:
"Error Brief : A data element contains characters not listed in the allowed character set."
Finally, if the b2b.encoding=ISO-8859-1
property is set in Fusion Middleware Enterprise Management Control console, you will see that the character ÿ
when the emacs editor is used to view the output file. If b2b.encoding
is not set, the default UTF-8 character set is used. In this case, you will see the two characters ÿ
instead of ÿ
using the emacs editor. The reason for this is that the character ÿ
is encoded in two bytes in the UTF-8 code page.
You can also test for multi-byte character set inserted into the 850.xml (make sure the multi-byte character is encoded correctly.) In addition, the database should support multi-byte character set. You can check the database character set by issuing the following SQL query:
select value from NLS_DATABASE_PARAMETERS where parameter = 'NLS_CHARACTERSET';