This class provides functions used to convert a non-ASCII C string given in ANSI, EUC, GB or SJIS format, to a Unicode string of extended characters, and vice versa.
More...
|
static void | ConvertSJISToUnicode (const Standard_CString fromstr, TCollection_ExtendedString &tostr) |
| Converts non-ASCII CString <fromstr> in SJIS format to Unicode ExtendedString <tostr>. More...
|
|
static void | ConvertEUCToUnicode (const Standard_CString fromstr, TCollection_ExtendedString &tostr) |
| Converts non-ASCII CString <fromstr> in EUC format to Unicode ExtendedString <tostr>. More...
|
|
static void | ConvertGBToUnicode (const Standard_CString fromstr, TCollection_ExtendedString &tostr) |
| Converts non-ASCII CString <fromstr> in GB format to Unicode ExtendedString <tostr>. More...
|
|
static Standard_Boolean | ConvertGBKToUnicode (const Standard_CString fromstr, TCollection_ExtendedString &tostr) |
| Converts non-ASCII CString <fromstr> in GBK format to Unicode ExtendedString <tostr>. More...
|
|
static Standard_Boolean | ConvertBig5ToUnicode (const Standard_CString fromstr, TCollection_ExtendedString &tostr) |
| Converts non-ASCII CString <fromstr> in Big5 format to Unicode ExtendedString <tostr>. More...
|
|
static void | ConvertANSIToUnicode (const Standard_CString fromstr, TCollection_ExtendedString &tostr) |
| Converts non-ASCII CString <fromstr> in ANSI format to Unicode ExtendedString <tostr>. More...
|
|
static Standard_Boolean | ConvertUnicodeToSJIS (const TCollection_ExtendedString &fromstr, Standard_PCharacter &tostr, const Standard_Integer maxsize) |
| Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in SJIS format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion. More...
|
|
static Standard_Boolean | ConvertUnicodeToEUC (const TCollection_ExtendedString &fromstr, Standard_PCharacter &tostr, const Standard_Integer maxsize) |
| Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in EUC format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion. More...
|
|
static Standard_Boolean | ConvertUnicodeToGB (const TCollection_ExtendedString &fromstr, Standard_PCharacter &tostr, const Standard_Integer maxsize) |
| Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in GB format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion. More...
|
|
static Standard_Boolean | ConvertUnicodeToANSI (const TCollection_ExtendedString &fromstr, Standard_PCharacter &tostr, const Standard_Integer maxsize) |
| Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in ANSI format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion. More...
|
|
static void | SetFormat (const Resource_FormatType typecode) |
| Defines the current conversion format as typecode. This conversion format will then be used by the functions ConvertFormatToUnicode and ConvertUnicodeToFormat to convert the strings. More...
|
|
static Resource_FormatType | GetFormat () |
| Returns the current conversion format (either ANSI, EUC, GB or SJIS). The current converting format must be defined in advance with the SetFormat function. More...
|
|
static void | ReadFormat () |
| Reads converting format from resource "FormatType" in Resource Manager "CharSet". More...
|
|
static void | ConvertFormatToUnicode (const Standard_CString theFromStr, TCollection_ExtendedString &theToStr) |
| Converts the non-ASCII C string (as specified by GetFormat()) to the Unicode string of extended characters. More...
|
|
static void | ConvertFormatToUnicode (const Resource_FormatType theFormat, const Standard_CString theFromStr, TCollection_ExtendedString &theToStr) |
| Converts the non-ASCII C string in specified format to the Unicode string of extended characters. More...
|
|
static Standard_Boolean | ConvertUnicodeToFormat (const Resource_FormatType theFormat, const TCollection_ExtendedString &theFromStr, Standard_PCharacter &theToStr, const Standard_Integer theMaxSize) |
| Converts the Unicode string of extended characters to the non-ASCII string according to specified format. You need more than twice the length of the source string to complete the conversion. The function returns true if conversion is complete, i.e. the maximum number of characters is not reached before the end of conversion. More...
|
|
static Standard_Boolean | ConvertUnicodeToFormat (const TCollection_ExtendedString &theFromStr, Standard_PCharacter &theToStr, const Standard_Integer theMaxSize) |
| Converts the Unicode string of extended characters to the non-ASCII string according to the format returned by the function GetFormat. More...
|
|
This class provides functions used to convert a non-ASCII C string given in ANSI, EUC, GB or SJIS format, to a Unicode string of extended characters, and vice versa.