CFx SDK Documentation
2022 SP0
|
#include <OdCharMapper.h>
Static Public Member Functions | |
static OdResult | initialize (const OdString &filename) |
static OdResult | unicodeToCodepage (OdChar sourceChar, OdCodePageId codepageId, OdChar &codepageChar, bool bTryToUseSystemCP=true) |
static OdResult | unicodeToCodepage2 (OdChar sourceChar, OdCodePageId codepageId, OdChar &codepageChar) |
static OdResult | codepageToUnicode (OdChar sourceChar, OdCodePageId codepageId, OdChar &unicodeChar) |
static bool | isLeadByte (OdUInt8 testByte, OdCodePageId codepageId) |
static OdResult | codepageDescToId (const OdString &description, OdCodePageId &codepageId) |
static OdResult | codepageIdToDesc (OdCodePageId codepageId, OdString &description) |
static OdUInt32 | numValidCodepages () |
static OdCodePageId | ansiCpToAcadCp (OdUInt32 ansiCodePage) |
static OdUInt32 | acadCpToAnsiCp (OdCodePageId acadCodePageId) |
static OdCodePageId | getCodepageByCharset (OdUInt16 ansiCharacterSet) |
static OdUInt16 | getReorderCharsetByChar (OdChar ch) |
static bool | isConversionSupported (OdCodePageId codepageId) |
static void | wideCharToMultiByte (OdCodePageId codePage, const OdChar *srcBuf, int srcSize, OdAnsiCharArray &dstBuf) |
static void | multiByteToWideChar (OdCodePageId codePage, const char *srcBuf, int srcSize, OdCharArray &dstBuf) |
static void | utf8ToUnicode (const char *srcBuf, int srcSize, OdCharArray &dstBuf) |
static void | unicodeToUtf8 (const OdChar *srcBuf, int srcSize, OdAnsiCharArray &dstBuf) |
static OdResult | addBigFontWithIndex (const OdString &bigFont, OdInt32 cpIndex) |
static OdResult | addBigFontWithCodepage (const OdString &bigFont, OdCodePageId codePageId) |
static OdResult | addBigFonts (OdStreamBuf *io) |
static OdCodePageId | getCpByBigFont (const OdString &bigFont) |
static OdInt32 | getCpIndexByBigFont (const OdString &bigFont) |
static double | getCheckSumAnsi (OdAnsiString str) |
static double | getCheckSumUnicode (OdString str) |
static OdString | convertCIFcoding (const OdString &strText) |
This class implements character mapping. Corresponding C++ library: TD_Root <group Other_Classes>
Definition at line 47 of file OdCharMapper.h.
|
static |
Returns the ANSI code page corresponding to the specified code page.
acadCodePageId | [in] code page. |
|
static |
Adds the bigfont list from io stream to map.
io | [in] stream with next format. |
Anything after a '#' character is a comment (and ignored) The ';' character is used to separate the file name from the code page index
<BIGFONTFILENAME.SHX>;
There should be no leading or trailing spaces for the filename
JAPANESE_CODEPAGE_INDEX = 1, TRADITIONAL_CHINESE_CODEPAGE_INDEX = 2, KOREAN_CODEPAGE_INDEX = 3, KOREAN_JOHAB_CODEPAGE_INDEX = 4, SIMPLIFIED_CHINESE_CODEPAGE_INDEX = 5
Returns eOk if successful, or an appropriate error code if not.
|
static |
Adds the bigFont to map.
bigFont | [in] big font file name. |
codePageId | [in] CodePage ID. |
@untitled table CP_ANSI_932 CP_ANSI_950 CP_ANSI_949 CP_ANSI_936
Returns eOk if successful, or an appropriate error code if not.
|
static |
Adds the bigFont to map.
bigFont | [in] big font file name. |
cpIndex | [in] code page index. |
Description 1 CP_ANSI_932 2 CP_ANSI_950 3 CP_ANSI_949 5 CP_ANSI_936
Returns eOk if successful, or an appropriate error code if not.
|
static |
Returns the code page corresponding to the specified ANSI code page.
ansiCodePage | [in] ANSI code page. |
|
static |
Returns the code page with the specified description.
description | [in] Description. |
codepageId | [out] Receives the object ID of the code page. |
|
static |
Returns the description for the specified code page.
description | [out] Receives the description. |
codepageId | [in] Object ID of the code page. |
|
static |
Maps the specified code page character to Unicode.
sourceChar | [in] Code page source character. |
codepageId | [in] Object ID of the code page. |
unicodeChar | [out] Receives the Unicode character. |
|
static |
Returns the check sum for an ANSI string.
str | [in] String for calculating check sum. |
|
static |
Returns the check sum for a unicode string.
str | [in] String for calculating check sum. |
|
static |
Returns the code page corresponding to the specified ANSI character set.
ansiCharacterSet | [in] Character Set. |
|
static |
Returns the OdCodePageId.
@untitled table CP_ANSI_932 CP_ANSI_950 CP_ANSI_949 CP_ANSI_936
bigFont | [in] big font file name. |
Returns the code page index.
Description 1 CP_ANSI_932 2 CP_ANSI_950 3 CP_ANSI_949 5 CP_ANSI_936
bigFont | [in] big font file name. |
Initializes this CharMapper object from the specified mapping file.
filename | [in] File name. |
|
static |
Returns true if and only if the specified code page supports conversion.
codepageId | [in] Object ID of the code page. |
|
static |
Returns true if and only if the specified byte is one of the leading bytes of the specified code page.
testByte | [in] Byte to test. |
codepageId | [in] Object ID of the code page. |
|
static |
|
static |
Returns the number of valid code pages for this CharMapper object.
|
static |
Maps the specified Unicode character to the specified code page.
sourceChar | [in] Unicode source character. |
codepageId | [in] Object ID of the code page. |
codepageChar | [out] Receives the code page character. |
bTryToUseSystemCP | [in] Try to use default ANSI code page and OEM code page in case conversion with codepageId is not OK |
|
static |
Maps the specified Unicode character to the specified code page using IMLangFontLink2 interface.
sourceChar | [in] Unicode source character. |
codepageId | [in] Object ID of the code page. |
codepageChar | [out] Receives the code page character. |
|
static |
|
static |
|
static |