![]() | InDesign SDK 20.5 |
#include <IEncodingUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_IENCODINGUTILS } |
| enum | encodingType { kCharInput = 0, kShiftJIS, kJIS, kKuten, kBig5, kGB, kKorean, kUnicode } |
Public Member Functions | |
| virtual void | Unicode2ShiftJIS (textchar &ch)=0 |
| virtual void | ShiftJIS2Unicode (textchar &ch)=0 |
| virtual void | ShiftJIS2JIS (textchar &ch)=0 |
| virtual void | JIS2ShiftJIS (textchar &ch)=0 |
| virtual void | JIS2Kuten (textchar &ch)=0 |
| virtual void | Kuten2JIS (textchar &ch)=0 |
| virtual textchar | ShiftJIS2Unicode (PlatformChar ch)=0 |
| virtual textchar | ShiftJIS2JIS (PlatformChar ch)=0 |
| virtual encodingType | PopupIndexToEncodingType (int32 popupIndex)=0 |
| virtual UTF32TextChar | StringToCharacterCode (PMString &str, encodingType encoding)=0 |
| virtual PMString | CharacterCodeToString (UTF32TextChar code, encodingType encoding)=0 |
| virtual uint32 | GetHexCode (PMString &s)=0 |
| virtual textchar | GetKutenCode (PMString &s)=0 |
| virtual bool16 | IsHex (uchar c)=0 |
| virtual bool16 | IsDecimal (uchar c)=0 |
| virtual int32 | IntValue (uchar c)=0 |
| virtual UTF32TextChar | DoubleByteEncoding2unicode (uchar16 ch, uint8 script=-1)=0 |
| virtual bool16 | DoubleByteIsValidUnicode (const textchar &inChar, uint8 script=-1)=0 |
| virtual uchar16 | unicode2DoubleByteEncoding (const UTF32TextChar &ch, uint8 script=-1)=0 |
| virtual textchar | FontBasedPlatformEncoding2Unicode (PlatformChar platformChar, IPMFont *transFont)=0 |
| virtual PlatformChar | FontBasedUnicode2PlatformEncoding (UTF32TextChar unicodeChar, IPMFont *transFont, uint8 script=-1)=0 |
| virtual bool16 | IsPossibleLeadByte (uchar charByte, int8 script)=0 |
| virtual bool16 | IsPossibleSecondByte (uchar charByte, int8 script)=0 |
| virtual bool16 | IsDoubleByteScript (int8 script)=0 |
| virtual bool16 | ValidLineBreakAfterIndex (const PMString &, CharCounter index)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Utilities for converting encodings. i.e. Utils<IEncodingUtils>()->Unicode2ShiftJIS( ch );
Encoding Type
| pure virtual |
Converts a Unicode value to a string representation of a character code.
| code | Unicode to convert |
| encoding | encoding |
| pure virtual |
Convert character to unicode.
| ch | character to convert. |
| script | script of character. If -1 default script of PMString is used. |
| pure virtual |
Character has Unicode value.
| ch | character to check. |
| script | script of character. If -1 default script of PMString is used. |
| pure virtual |
Convert character to unicode using font to convert.
| platformChar | platform character to convert |
| transFont | font to use to convert |
| pure virtual |
DESCRIPTION
| unicodeChar | unicode character to convert |
| transFont | font to use to convert. If nil script is used to convert. |
| script | script for conversion if transFont is nil. If -1 default script of PMString is used. |
| pure virtual |
Converts a string representation of a Unicode value to a Unicode value. So "0041" becomes the unicode value for 'A'
| s | string representation of unicode value |
| pure virtual |
Converts a Kuten Code to a Unicode value.
| s | Kuten Code |
| pure virtual |
Get integer value of character
| c | character to check. should be '0' - '9' or 'A'-'F' or 'a'-'F'. |
| pure virtual |
Character is '0' - '9'
| c | character to check |
| pure virtual |
Checks if script is double byte.
| script | script to check |
| pure virtual |
Character is '0' - '9' or 'A'-'F' or 'a'-'F'
| c | character to check |
| pure virtual |
Character is in lead byte range for script.
| charByte | byte to check |
| script | script to check with. using -1 will always return kFalse. |
| pure virtual |
Character is in possible second byte range for script.
| charByte | byte to check |
| script | script to check with. using -1 will always return kFalse. |
| pure virtual |
Convert JIS value to kuten value.
| ch | IN/OUT on exit ch contains kuten value. |
| pure virtual |
Convert JIS value to shift JIS value.
| ch | IN/OUT on exit ch contains shift JIS value. |
| pure virtual |
Convert kuten value to JIS value.
| ch | IN/OUT on exit ch contains JIS value. |
| pure virtual |
Use this if you have a popup with the following Entries - Character Input, Separator, Shift JIS, JIS, Kuten, Unicode
| popupIndex | index in popup |
| pure virtual |
Convert shift JIS to JIS value.
| ch | IN/OUT on exit ch contains JIS value. |
| pure virtual |
Convert shift JIS to JIS
| ch | shift JIS value |
| pure virtual |
Convert shift JIS value to Unicode value.
| ch | IN/OUT on exit ch contains unicode value. |
| pure virtual |
Convert shift JIS to unicode
| ch | shift JIS value |
| pure virtual |
Converts a string representation of a character code to a Unicode value. So "0041" with encoding kUnicode becomes the unicode value for 'A'
| str | string representation of character code |
| encoding | encoding |
| pure virtual |
Convert Unicode value to platform encoding.
| ch | unicode value to convert |
| script | script of character. If -1 default script of PMString is used. |
| pure virtual |
Convert Unicode value to shift JIS value.
| ch | IN/OUT on exit ch contains shift JIS value. |
| pure virtual |
Determine if we can break string after the character index
| s | string to check |
| index | index to check |