Routines for working with texts and characters in different encodings
◆ HPDF_Encoder_GetByteType()
Get byte type of a text
char at index
position.
- Parameters
-
encoder | Encoder object handle. |
text | Text to analyze. |
index | Character index. |
- Returns
- Character byte type value.
- See also
- _HPDF_ByteType
- Examples
- character_map.c.
◆ HPDF_Encoder_GetType()
◆ HPDF_Encoder_GetUnicode()
Convert a specified character code to Unicode value.
- Parameters
-
encoder | Encoder object handle. |
code | Character code to convert. |
- Returns
- Character Unicode value.
- Examples
- character_map.c.
◆ HPDF_Encoder_GetWritingMode()
Get writing mode for the encoding object.
- Parameters
-
encoder | Encoder object handle. |
- Returns
- Encoder writing mode value.
- See also
- _HPDF_WritingMode
◆ HPDF_GetCurrentEncoder()
◆ HPDF_GetEncoder()
◆ HPDF_SetCurrentEncoder()
Set current encoder for document.
- Parameters
-
pdf | Document object handle. |
encoding_name | Valid encoding name |
- Returns
- Encoder object handle on success, otherwise returns
NULL
and calls error handler.
- Error codes
- Examples
- utf8.c.
◆ HPDF_UseCNSEncodings()
Enable simplified Chinese encodings.
Application can following simplified Chinese encodings after HPDF_UseCNSEncodings() call:
Encoding |
GB-EUC-H |
GB-EUC-V |
GBK-EUC-H |
GBK-EUC-V |
- Parameters
-
pdf | Document object handle. |
- Returns
- HPDF_OK on success, otherwise returns error code and calls error handler.
- Error codes
- Examples
- character_map.c, and chfont_demo.c.
◆ HPDF_UseCNTEncodings()
Enable traditional Chinese encodings.
Application can following traditional Chinese encodings after HPDF_UseCNTEncodings() call:
Encoding |
GB-EUC-H |
GB-EUC-V |
GBK-EUC-H |
GBK-EUC-V |
- Parameters
-
pdf | Document object handle. |
- Returns
- HPDF_OK on success, otherwise returns error code and calls error handler.
- Error codes
- Examples
- character_map.c.
◆ HPDF_UseJPEncodings()
◆ HPDF_UseKREncodings()
Enable Korean encodings.
Application can following Korean encodings after HPDF_UseKREncodings() call:
Encoding |
KSC-EUC-H |
KSC-EUC-V |
KSCms-UHC-H |
KSCms-UHC-HW-H |
KSCms-UHC-HW-V |
- Parameters
-
pdf | Document object handle. |
- Returns
- HPDF_OK on success, otherwise returns error code and calls error handler.
- Error codes
- Examples
- character_map.c.
◆ HPDF_UseUTFEncodings()
Enable UTF-8 encoding.
Application can include UTF-8 encoded Unicode text (up to 3-byte UTF-8 sequences).
- Note
- UTF-8 encoding works only with TrueType fonts.
- Parameters
-
pdf | Document object handle. |
- Returns
- HPDF_OK on success, otherwise returns error code and calls error handler.
- Error codes
- Examples
- utf8.c.