EDM String encoding
A general string-encoding concept is implemented in EDM to enable storing any UNICODE character in a UTF-8 encoded way in an EDMmodel. Each EDMdatabase has a default string encoding. Using the EDMinterface operation edmiSetInternalDataBN on the system configurable variable named EDM_DEFAULT_STRING_ENCODING can change this default string encoding. EDMdatabase default string encoding can also be set or changed by using the EDMsupervisor commands
System Adm.>Set config parameter or
Remote Systems>System Adm.>Set config parameter.
The default string encoding is normally set to ISO-LATIN-1. Below is the list of available encoding names:
Encoding |
UTF-8 |
UTF-16 |
ISO-10646-UCS-2 |
ISO-10646-UCS-4 |
ISO-LATIN-1 |
ISO-LATIN-2 |
ISO-8859-3 |
ISO-8859-4 |
ISO-8859-5 |
ISO-8859-6 |
ISO-8859-7 |
ISO-8859-8 |
ISO-8859-9 |
ISO-2022-JP |
SHIFT_JIS |
EUC-JP |
When an EDMdataModel is created, the string encoding for the model is by default set to the actual EDMdatabase default string encoding. The EDMinterface operations edmiCreateModel, edmiCreateModelBN, edmiRemoteCreateModel operations have the following available options to set a specified string encoding to the actual created model. The following table list of encoding options for the set of edmiCreateModel, edmiCreateModelBN, edmiRemoteCreateModel operations:
Encoding |
CHAR_ENCODING_UTF-8 |
CHAR_ENCODING_UTF-16 |
CHAR_ENCODING_ISO-10646-UCS-2 |
CHAR_ENCODING_ISO-10646-UCS-4 |
CHAR_ENCODING_ISO-LATIN-1 |
CHAR_ENCODING_ISO-LATIN-2 |
CHAR_ENCODING_ISO-8859-3 |
CHAR_ENCODING_ISO-8859-4 |
CHAR_ENCODING_ISO-8859-5 |
CHAR_ENCODING_ISO-8859-6 |
CHAR_ENCODING_ISO-8859-7 |
CHAR_ENCODING_ISO-8859-8 |
CHAR_ENCODING_ISO-8859-9 |
CHAR_ENCODING_ISO-2022-JP |
CHAR_ENCODING_SHIFT_JIS |
CHAR_ENCODING_EUC-JP |
The EDMexpressX built-in functions xpfCreateModel, xpfCreateModelBN, have the following list of options to specify the string encoding on the actual created EDMdataModel. The following table list of encoding options for the set of xpfCreateModel, xpfCreateModelBN operations:
Encoding |
XPXCHAR_ENCODING_UTF-8 |
XPXCHAR_ENCODING_UTF-16 |
XPXCHAR_ENCODING_ISO-10646-UCS-2 |
XPXCHAR_ENCODING_ISO-10646-UCS-4 |
XPXCHAR_ENCODING_ISO-LATIN-1 |
XPXCHAR_ENCODING_ISO-LATIN-2 |
XPXCHAR_ENCODING_ISO-8859-3 |
XPXCHAR_ENCODING_ISO-8859-4 |
XPXCHAR_ENCODING_ISO-8859-5 |
XPXCHAR_ENCODING_ISO-8859-6 |
XPXCHAR_ENCODING_ISO-8859-7 |
XPXCHAR_ENCODING_ISO-8859-8 |
XPXCHAR_ENCODING_ISO-8859-9 |
XPXCHAR_ENCODING_ISO-2022-JP |
XPXCHAR_ENCODING_SHIFT_JIS |
XPXCHAR_ENCODING_EUC-JP |
EDMinterface data model string encoding operations:
The following set of EDMinterface operations are implemented to set, read and modify the string encoding of an EDMdataModel:
edmiGetModelStringEncoding, edmiGetModelStringEncodingName , edmiGetStringEncoding, edmiGetStringEncodingName, edmiSetModelStringEncoding, edmiRemoteGetModelStringEncoding
edmiRemoteGetModelStringEncodingName, edmiRemoteGetStringEncoding, edmiRemoteGetStringEncodingName, edmiRemoteSetModelStringEncoding
EDMexpressX data model string encoding operations
The following set of EDMexpressX built-in functions are implemented to set, read or modify the string encoding of an EDMdataModel:
xpfGetModelStringEncoding, xpfGetModelStringEncodingName, xpfGetStringEncoding, xpfGetStringEncodingName, xpxSetModelStringEncoding
In the above listed EDMexpressX built-in functions, the argument "stringEncodingName" is one of the elements listed in TABLE 1 and the argument "stringEncoding" is one of the elements listed in TABLE 3.
EDMinterface string encoding conversion functions
The following set of EDMinterface operations are implemented to convert a string from one encoding style to another:
The arguments inputStringEncoding and convertedStringEncoding must be specified as one of the elements listed in TABLE 2.
The argument anyChanges is optional, i.e., can be specified as the value NULL. When at least one character in the inputString is changed during the conversion, the anyChanges argument is set to sdaiTRUE, else the argument is set to sdaiFALSE.
edmiConvertString, edmiRemoteConvertString
EDMexpressX string encoding conversion function
The EDMexpressX built-in function xpfConvertString can be used to convert a string from one string encoding style to another.
EDMstepFileFactory string encoding
The ISO 10303-21: STEP Physical File (SPF) format specification defines a string encoding style (SPF string encoding) that covers all UNICODE characters. For SPF read/write operations, EDM provides conversion between SPF and ISO-LATIN-1/UTF-8 string encoding. Hence, a SPF read/write operation can only be performed on an EDMdataModel with string encoding set to ISO-LATIN-1 or UTF-8. The UTF-8 string encoding cover all characters defined in the UNICODE character set. In a SPF read operation, a recoverable error will be reported when a encoded character in a SPF is detected that cannot be encoded in the string encoding defined for the actual EDMdataModel to populate.
The EDMinterfaceOperations edmiReadStepFile, edmiReadStepFileEx, edmiImportStepFile, edmiRemoteReadStepFile and edmiRemoteExportModel are all enhanced with the options UTF_8_STRING_ENCODING and ISO_LATIN_1_STRING_ENCODING to specify the string encoding on the EDMdataModel that is created by the actual SPF read operation. When the option ADD_TO_EXISTING_MODEL is enabled in a SPF read operation, the UTF_8_STRING_ENCODING and ISO_LATIN_1_STRING_ENCODING options will have no effect.
For the same purpose as for the EDMinterface SPF read operations, the EDMexpressX buil-in SPF read operations: xpxReadStepFile, xpxReadStepFileEx and xpxReadStepFileExEx have been enhanced with the options XPXUTF_8_STRING_ENCODING and XPXISO_LATIN_1_STRING_ENCODING.