Defines | |
| #define | ENCODING_ASCII ENCODING_ISO2022 |
| #define | ENCODING_ISO2022 0 |
| #define | ENCODING_Unicode -1 |
| #define | GLYPHSUB_AllowCircleForms 0x00000200 |
| #define | GLYPHSUB_AllowCompatForms 0x00000004 |
| #define | GLYPHSUB_AllowFontForms 0x00000400 |
| #define | GLYPHSUB_AllowFractionForms 0x00000010 |
| #define | GLYPHSUB_AllowNarrowForms 0x00000002 |
| #define | GLYPHSUB_AllowNoBreakForms 0x00000800 |
| #define | GLYPHSUB_AllowPositionalForms 0x00000008 |
| #define | GLYPHSUB_AllowSmallForms 0x00000080 |
| #define | GLYPHSUB_AllowSquareForms 0x00000100 |
| #define | GLYPHSUB_AllowSubscriptForms 0x00000020 |
| #define | GLYPHSUB_AllowSuperscriptForms 0x00000040 |
| #define | GLYPHSUB_AllowVerticalForms 0x00001000 |
| #define | GLYPHSUB_AllowWideForms 0x00000001 |
| #define | MUC_THAI_OF 1 |
| #define | MUC_THAI_TTF 2 |
| #define | MUCEVENT_ComposeOff 0x02 |
| #define | MUCEVENT_ComposeOn 0x01 |
| #define | MUCEVENT_ComposeToggle (MUCEVENT_ComposeOn|MUCEVENT_ComposeOff) |
Functions | |
| LIBEXPORT int | MucCharsetToUnicode (int val, int charset) |
| LIBEXPORT int | MucCharsetToUnicodeBuf (UNICODE *buf, int charset) |
| LIBEXPORT int | MucConvertFromISO2022 (void *vcd, const void *vinbuf, char **outbuf) |
| LIBEXPORT int | MucConvertFromUnicode (void *vcd, const UNICODE *ucbuf, void **outbufp) |
| LIBEXPORT int | MucConvertISO2022aToUnicode (const void *, UNICODE **) |
| LIBEXPORT int | MucConvertISO2022ToUnicode (const void *, UNICODE **) |
| LIBEXPORT int | MucConvertToISO2022 (void *vcd, const void *vinbuf, char **outbuf) |
| LIBEXPORT int | MucConvertToUnicode (void *vcd, const void *vinbuf, UNICODE **outbuf) |
| LIBEXPORT int | MucConvertUnicodeGen (const UNICODE *inbuf, int(*NewCharsetFunc)(int NewCharset, int OldCharset, void *UserData), int(*AddCharsFunc)(UINT8 *chars, int len, void *UserData), void *UserData, UINT32 flags) |
| LIBEXPORT int | MucConvertUnicodeToISO2022 (const UNICODE *inbuf, char **outbuf) |
| LIBEXPORT int | MucConvertUnicodeToUTF8 (const UNICODE *instr, UINT8 **outstr) |
| LIBEXPORT int | MucConvertUTF8ToUnicode (const UINT8 *instr, UNICODE **outstr) |
| LIBEXPORT UNICODE * | MucDecompose (const UNICODE *string) |
| LIBEXPORT UNICODE * | MucDoGlyphSubstitutions (const UNICODE *instr, bool(*CB_AllowSub)(const UCDATA *sub, void *cbdata), void *cbdata, UINT32 flags=0) |
| LIBEXPORT UNICODE * | MucFlipVisualAndLogicalOrder (const UNICODE *) |
| LIBEXPORT void | MucFPrintfA (void *handle, const char *format,...) |
| LIBEXPORT void | MucFPrintfAV (void *handle, const char *format, va_list) |
| LIBEXPORT void | MucFPrintfClose (void *handle) |
| LIBEXPORT void | MucFPrintfFlush (void *handle) |
| LIBEXPORT int | MucFPrintfOpen (const UNICODE *filename, const char *filemode, const char *encoding, void **handle) |
| LIBEXPORT void | MucFPrintfU (void *handle, const UNICODE *format,...) |
| LIBEXPORT void | MucFPrintfUV (void *handle, const UNICODE *format, va_list) |
| LIBEXPORT int | MucGetDefaultCharsets (int *charset1, int *charset2, int *charset3) |
| LIBEXPORT CHAR_ENCODING | MucGetEncodingFromName (const char *name) |
| LIBEXPORT CHAR_ENCODING | MucGetEncodingFromNum (int num, ENCODELIST_FLAGS flags) |
| LIBEXPORT int | MucGetEncodingNum (CHAR_ENCODING encoding, ENCODELIST_FLAGS flags) |
| LIBEXPORT int | MucGetGlyphDirection (const UNICODE *uc, int curdir, UINT8 *glyphflags) |
| LIBEXPORT const char * | MucGetName (CHAR_ENCODING encoding) |
| LIBEXPORT int | MucGetNumEncodings (ENCODELIST_FLAGS flags) |
| LIBEXPORT int | MucGuessJapaneseEncoding (const UINT8 *in, char *encoding) |
| LIBEXPORT int | MucHasRightToLeftTextISO2022 (const char *in) |
| LIBEXPORT int | MucHasRightToLeftTextUC (const UNICODE *in) |
| LIBEXPORT ERRVALUE | MucIndicGlyphSubstitutions (const UNICODE *instr, UNICODE **outstr, SCRIPTTAG script=SCRIPTTAG_Default, INT32 len=-1, bool bApplyRephHack=false) |
| LIBEXPORT int | MucInitConversion (void **handle, const char *encoding, UINT32 flags) |
| LIBEXPORT bool | MucIsThaiLowerVowel (UNICODE ch) |
| LIBEXPORT bool | MucIsThaiTone (UNICODE ch) |
| LIBEXPORT bool | MucIsThaiUpperVowel (UNICODE ch) |
| LIBEXPORT bool | MucIsThaiVowel (UNICODE ch) |
| LIBEXPORT int | MucNameToCharset (const char *name, ENCODELIST_FLAGS flags) |
| LIBEXPORT char * | MucNameToDesc (const char *name) |
| LIBEXPORT UNICODE * | MucNameToDescUC (const char *name) |
| LIBEXPORT int | MucNameToNum (const char *name, ENCODELIST_FLAGS flags) |
| LIBEXPORT char * | MucNumToDesc (int num, ENCODELIST_FLAGS flags) |
| LIBEXPORT UNICODE * | MucNumToDescUC (int num, ENCODELIST_FLAGS flags) |
| LIBEXPORT const char * | MucNumToName (int num, ENCODELIST_FLAGS flags) |
| LIBEXPORT int | MucQuickConvToISO2022 (int encodetype, const void *in, char **outp) |
| LIBEXPORT int | MucQuickConvToUnicode (int encodetype, const void *in, UNICODE **ucp) |
| LIBEXPORT UNICODE * | MucRecompose (const UNICODE *string) |
| LIBEXPORT void | MucReset (void *handle) |
| LIBEXPORT void | MucStopConversion (void *handle) |
| LIBEXPORT int | MucStrLenISO2022 (const void *vinbuf) |
| LIBEXPORT UNICODE * | MucThaiShiftTonesAndVowels (const UNICODE *str, UINT32 fontencoding) |
| LIBEXPORT int | MucUnicodeToCharset (int val, int charset) |
| LIBEXPORT UNICODE * | strntouc (UNICODE *dest, const char *source, int len) |
| LIBEXPORT UNICODE * | strtouc (UNICODE *dest, const char *source) |
| LIBEXPORT UNICODE * | strtouccat (UNICODE *dest, const char *source) |
| LIBEXPORT UNICODE * | strtoucdup (const char *) |
| bool | ucisdigit (UNICODE digit) |
| LIBEXPORT DEPRECATED char * | ucntostr (char *dest, const UNICODE *source, int len) |
| LIBEXPORT UNICODE * | ucstrcat (UNICODE *dest, const UNICODE *source) |
| LIBEXPORT UNICODE * | ucstrchr (const UNICODE *p, UNICODE value) |
| LIBEXPORT int | ucstrcmp (const UNICODE *p1, const UNICODE *p2) |
| LIBEXPORT UNICODE * | ucstrcpy (UNICODE *dest, const UNICODE *source) |
| LIBEXPORT UNICODE * | ucstrdup (const UNICODE *s) |
| LIBEXPORT int | ucstricmp (const UNICODE *p1, const UNICODE *p2) |
| LIBEXPORT size_t | ucstrlen (const UNICODE *p) |
| LIBEXPORT UNICODE * | ucstrlwr (UNICODE *p) |
| LIBEXPORT UNICODE * | ucstrncat (UNICODE *p1, const UNICODE *p2, int len) |
| LIBEXPORT int | ucstrncmp (const UNICODE *p1, const UNICODE *p2, int len) |
| LIBEXPORT UNICODE * | ucstrncpy (UNICODE *dest, const UNICODE *source, int len) |
| LIBEXPORT int | ucstrnicmp (const UNICODE *p1, const UNICODE *p2, int len) |
| LIBEXPORT UNICODE * | ucstrpbrk (UNICODE *s, UNICODE *accept) |
| LIBEXPORT UNICODE * | ucstrrchr (UNICODE *s, UNICODE value) |
| LIBEXPORT size_t | ucstrspn (const UNICODE *s, const UNICODE *accept) |
| LIBEXPORT UNICODE * | ucstrstr (UNICODE *s, const UNICODE *p) |
| LIBEXPORT UNICODE * | ucstrtok (UNICODE *s, UNICODE *delim) |
| LIBEXPORT UNICODE * | ucstrupr (UNICODE *p) |
| LIBEXPORT DEPRECATED char * | uctostr (char *dest, const UNICODE *source) |
| LIBEXPORT DEPRECATED char * | uctostrdup (const UNICODE *) |
|
|
Definition at line 1812 of file ucstring.h. |
|
|
Definition at line 1811 of file ucstring.h. |
|
|
Definition at line 1810 of file ucstring.h. |
|
|
Definition at line 1411 of file ucstring.h. |
|
|
Compatibility (equivalent) forms.
Definition at line 1404 of file ucstring.h. |
|
|
Definition at line 1412 of file ucstring.h. |
|
|
"1/2" -> single glyph
Definition at line 1406 of file ucstring.h. |
|
|
Definition at line 1403 of file ucstring.h. |
|
|
Definition at line 1413 of file ucstring.h. |
|
|
Arabic/Hebrew.
Definition at line 1405 of file ucstring.h. |
|
|
Definition at line 1409 of file ucstring.h. |
|
|
Definition at line 1410 of file ucstring.h. |
|
|
Definition at line 1407 of file ucstring.h. |
|
|
Definition at line 1408 of file ucstring.h. |
|
|
Definition at line 1414 of file ucstring.h. |
|
|
Definition at line 1402 of file ucstring.h. |
|
|
Definition at line 1712 of file ucstring.h. |
|
|
Definition at line 1713 of file ucstring.h. |
|
|
Definition at line 1815 of file ucstring.h. |
|
|
Definition at line 1814 of file ucstring.h. |
|
|
Definition at line 1816 of file ucstring.h. |
|
||||||||||||
|
Convert a single character from a given character set to UNICODE.
|
|
||||||||||||
|
Convert a string characters from a given character set to UNICODE. Operates in-place. |
|
||||||||||||||||
|
Convert string from ISO-2022 to anything.
|
|
||||||||||||||||
|
Convert string from UNICODE to anything.
|
|
||||||||||||
|
Convert an ISO-2022a string to UNICODE. ISO-2022a is a MicroImages invention -- a slightly modified version of ISO-2022 in which all backslashes are doubled. This is done because X resource files try to intrepret back slashes as something special even it the backslash is the 2nd byte of a 2-byte character. The caller should free the buffer returned |
|
||||||||||||
|
Convert an ISO-2022 string to UNICODE. The caller should free the buffer returned |
|
||||||||||||||||
|
Convert string from anything to ISO-2022. The "vcd" must have been initialized by calling MucInitConversion(). Assumes vinbuf is whatever vcd was initialized to. Caller must free outbuf when done |
|
||||||||||||||||
|
Convert string from anything to UNICODE. The "vcd" must have been initialized by calling MucInitConversion(). Assumes vinbuf is whatever vcd was initialized to. Caller must free outbuf when done |
|
||||||||||||||||||||||||
|
Convert string from UNICODE by calling callbacks. This function can be used to convert a string from UNICODE to just about anything. It assumes ISO-8859-1 as an initial character set. NewCharsetFunc() will be called when the function detects a character not available in the current character set. It tells you what character set it was in and what character set it wants to switch to. At this point, you can do whatever you need to do to switch fonts to one that supports the requested character set. You should return 0 or an error code < 0. AddCharsFunc() is called when an internal buffer fills up or just before calling NewCharsetFunc() to let add the characters to your output buffer or display them or whatever it is you're doing. The "characters" passed to you may be multi-byte. If this is the case, "len" is in bytes. |
|
||||||||||||
|
Convert a UNICODE string to ISO-2022. The caller should free the buffer returned |
|
||||||||||||
|
Convert UNICODE (UTF-16) to UTF8. Warning! This function assumes that the pointer passed in for outstr is either NULL or can be realloc'd as needed. You must therefore initialize it to somthing. |
|
||||||||||||
|
Convert UTF8 to UNICODE (UTF-16). Warning! This function assumes that the pointer passed in for outstr is either NULL or can be realloc'd as needed. You must therefore initialize it to somthing. |
|
|
Decompose a Unicode string into Canonical form. In a cononical Unicode string, all decomposable characters are decomposed. For example, 0x00E9 (LATIN SMALL LETTER E WITH ACUTE) is represented as 0x0065 (LATIN SMALL LETTER E) + 0x0301 (COMBINING ACUTE ACCENT) The caller should free the returned string |
|
||||||||||||||||||||
|
c++ This function returns a copy of the given string after performing glyph substitutions based on the decomposition data in UnicodeData.txt (which we've cooked into a compact form, ucdata.ref) Note: This function assumes the input string is in logical order and does not flip it in any way.
|
|
|
Flip Right-To-Left text to "visual" order. Returns a copy of the input string which caller must free. This function is symetric. That is, flipping the same string twice gives the original string. |
|
||||||||||||||||
|
Print to a file with ASCII format string. handle is a file returned by MucFPrintfOpen()
|
|
||||||||||||||||
|
Print to a file with ASCII format string (va_list version). handle is a file returned by MucFPrintfOpen()
|
|
|
Close a text file opend with MucFPrintfOpen().
|
|
|
Flush a text file opend with MucFPrintfOpen().
|
|
||||||||||||||||||||
|
Open a text file for use with MucFprint functions.
|
|
||||||||||||||||
|
Print to a file with UNICODE format string. handle is a file returned by MucFPrintfOpen()
|
|
||||||||||||||||
|
Print to a file with UNICODE format string (va_list version). handle is a file returned by MucFPrintfOpen()
|
|
||||||||||||||||
|
Returns the default charset for keyboard input. Returns 3 charset codes which can be used as hints when trying to convert UNICODE to ISO-2022. This is used by the input of the XeText widget.
|
|
|
Given an encoding name, return the CHAR_ENCODING value.
|
|
||||||||||||
|
Given an encoding number, return the CHAR_ENCODING value. This will return the Nth encoding which matches the criteria set forth by the flags parameter. Encoding numbers (as passed to this function) are not fixed and can change at any time. The only thing this function should be used for is retrieving a list of encodings to present the user with a choice.
|
|
||||||||||||
|
Return the index into array of encodings for a given encoding. If you use MucGetNumEncodings() and MucNumToName() to iterate through all the encodings of a given type for the purposes of generating a list for the user to select from, then this function is useful for determining which item in that list a given encoding will be so that you can make it the default.
|
|
||||||||||||||||
|
Determine the direction of a glyph. Given a UNICODE string and a current direction, determine the direction of the next character in the string. The glyphflags array is filled in by this function. Directions (both curdir and the return value)
|
|
|
Return an encoding name. Once an encoding is named, the name is set in stone and can be written to files without fear of the name changing. The actual name presented to the user is looked up in messages.txt by calling MucNameToDescUC() Do NOT free the return value from this function |
|
|
Get the number of supported encodings of a given type.
|
|
||||||||||||
|
Given a string which may be in either JIS, Shift-JIS, or EUC encoding, try to determine which it is. The "encoding" string passed in must be big enough to hold the resulting encoding name "Shift-JIS" is the longest string it can return. |
|
|
Determine if an ISO-2022 string has right-to-left text in it.
|
|
|
Determine if a UNICODE string has right-to-left text in it.
|
|
||||||||||||||||||||||||
|
Does Indic glyph substitution based on various rules. script should be one of the following: SCRIPTTAG_Default (See below) SCRIPTTAG_beng (Bengali) SCRIPTTAG_deva (Devanagari) SCRIPTTAG_gujr (Gujarati) SCRIPTTAG_knda (Kannada) SCRIPTTAG_mlym (Malayalam) SCRIPTTAG_orya (Oriya) SCRIPTTAG_punj (punjabi) SCRIPTTAG_taml (Tamil) SCRIPTTAG_telu (Telugu) If script is SCRIPTTAG_Default, currently it will fall back on Devanagari, but eventually it will try to find the current system script and use that. The len parameter is used to avoid an extra ucstrlen() call. If the caller already knows the length of instr, pass it. If not, just omit the parameter. The caller is responsible for freeing outstr The flag bApplyRephHack is just that, a hack. In order to correctly process the GSUB tables, we need to only apply the 'rphf' table if we have reordered a reph+halant+consonant combination to consonant+reph+halant. In order to do that, we need to somehow distinguish between text where we moved the reph and text where it was already there. To do this, if this flag is set, we change the reph to a fake Unicode character, one that we chose by subtracting 0x30 from the reph glyph. In all the Indic encodings, this falls on an unused code point (for example, 0x0930 becomes 0x0900). The caller knows to look for this and converts it back to the real reph glyph, but sets a flag telling us to process the 'rphf' table on it.
|
|
||||||||||||||||
|
Initialize a UNICODE conversion handle.
|
|
|
Returns true if ch is a Thai vowel character that sits below the consonant.
|
|
|
Returns true if ch is a Thai tone character.
|
|
|
Returns true if ch is a Thai vowel character that sits above the consonant.
|
|
|
Returns true if ch is a Thai vowel character.
|
|
||||||||||||
|
Determine the primary character set for a given encoding.
|
|
|
Return the description of an encoding given the name (char*). This looks up the incoding description from messages.txt. You should free the return value when you're done with it. Don't call this. Calle MucNameToDescUC() instead
|
|
|
Return the description of an encoding given the name (UNICODE*). This looks up the incoding description from messages.txt. You should free the return value when you're done with it. |
|
||||||||||||
|
The opposite of MucNumToName().
|
|
||||||||||||
|
Return the description of an encoding given the number (char*). This looks up the incoding description from messages.txt. You should free the return value when you're done with it. Don't call this. Calle MucNumToDescUC() instead
|
|
||||||||||||
|
Return the description of an encoding given the number (UNICODE*). This looks up the incoding description from messages.txt. You should free the return value when you're done with it. |
|
||||||||||||
|
Convert an encoding number to its name. Combines the following two functions
|
|
||||||||||||||||
|
Don't use this function.
|
|
||||||||||||||||
|
Don't use this function.
|
|
|
Recompose a Canonical form Unicode string into the combined forms. In a cononical Unicode string, all decomposable characters are decomposed. For example, 0x00E9 (LATIN SMALL LETTER E WITH ACUTE) is represented as 0x0065 (LATIN SMALL LETTER E) + 0x0301 (COMBINING ACUTE ACCENT). This function puts them back together. The caller should free the returned string |
|
|
Reset an Muc handle.
|
|
|
Stop a UNICODE conversion handle.
|
|
|
Determine the number of characters in an ISO-2022 string. Since ISO-2022 can consist of single-byte and two-byte characters and escape codes, a simple strlen() won't give you an accurate length. This function gives you the same result you'd get if you converted the string to UNICODE and called ucstrlen() on the result, but without going to the actual work. |
|
||||||||||||
|
|
|
||||||||||||
|
Convert a single UNICODE character to a given character set. Returns 0 if the character is not available in the given charset |
|
||||||||||||||||
|
Convert an ASCII string to Unicode (with length limit). Note, this function doesn't do any character set mapping. It simply casts all the source characters to (UNICODE) |
|
||||||||||||
|
Convert an ASCII string to Unicode. Note, this function doesn't do any character set mapping. It simply casts all the source characters to (UNICODE) |
|
||||||||||||
|
Convert an ASCII string to Unicode and append to existing string. Note, this function doesn't do any character set mapping. It simply casts all the source characters to (UNICODE) |
|
|
UNICODE version of strdup(). Note, this function doesn't do any character set mapping. It simply casts all the source characters to (UNICODE). The resulting string should be MmFree()'d. |
|
|
UNICODE version of isdigit(). It only detects the ASCII numerals 0-9. Note, that some implementations of isdigit() will crash if given Unicode values > 255. Definition at line 1004 of file ucstring.h. |
|
||||||||||||||||
|
Convert UNICODE string to ASCII (with length-limit).
|
|
||||||||||||
|
UNICODE version of strcat().
|