Skip to main content

convertFromString

convertFromString ( aString : string , charSetString : string ) : blob
convertFromString ( aString : string , charSetInt : integer ) : blob

ParameterTypeDescription
aStringstring->string expressed in current character set
charSetStringstring->Name of character set
charSetIntinteger->Number of character set
Resultblob<-blob containing converted string

Description

The convertFromString command can be used to convert a string expressed in the current character set to a string expressed in another character set.

In the aString parameter, pass the text to be converted. This text is expressed in the current character set (Unicode by default).

In charSetString or charSetInt, pass the character set to be used for the conversion. You can pass a string containing the standard name of the set (for example "ISO-8859-1" or "UTF-8"), or its MIBEnum identifier.

Here is a list of character sets supported by the convertFromString and convertToString commands:

MIBEnumName(s)
1017UTF-32
1018UTF-32BE
1019UTF-32LE
1015UTF-16
1013UTF-16BE
1014UTF-16LE
106UTF-8
1012UTF-7
3US-ASCII
3ANSI_X3.4-1968
3ANSI_X3.4-1986
3ASCII
3cp367
3csASCII
3IBM367
3iso-ir-6
3ISO_646.irv:1991
3ISO646-US
3us
2011IBM437
2011cp437
2011437
2011csPC8CodePage437
2028ebcdic-cp-us
2028cp037
2028csIBM037
2028ebcdic-cp-ca
2028ebcdic-cp-n
2028ebcdic-cp-wt
2028IBM037
2027MacRoman
2027x-mac-roman
2027mac
2027macintosh
2027csMacintosh
2252windows-1252
1250MacCE
1250x-mac-ce
2250windows-1250
1251x-mac-cyrillic
2251windows-1251
1253x-mac-greek
2253windows-1253
1254x-mac-turkish
2254windows-1254
1256x-mac-arabic
2256windows-1256
1255x-mac-hebrew
2255windows-1255
1257x-mac-ce
2257windows-1257
17Shift_JIS
17csShiftJIS
17MS_Kanji
17Shift-JIS
39ISO-2022-JP
39csISO2022JP
2026Big5
2026csBig5
38EUC-KR
38csEUCKR
2084KOI8-R
2084csKOI8R
4ISO-8859-1
4CP819
4csISOLatin1
4IBM819
4iso-ir-100
4ISO_8859-1
4ISO_8859-1:1987
4l1
4latin1
5ISO-8859-2
5csISOLatin2
5iso-ir-101
5ISO_8859-2
5ISO_8859-2:1987
5l2
5latin2
6ISO-8859-3
6csISOLatin3
6ISO-8859-3:1988
6iso-ir-109
6ISO_8859-3
6l3
6latin3
7ISO-8859-4
7csISOLatin4
7ISO-8859-4:1988
7iso-ir-110
7ISO_8859-4
7l4
7latin4
8ISO-8859-5
8csISOLatinCyrillic
8cyrillic
8ISO-8859-5:1988
8iso-ir-144
8ISO_8859-5
9ISO-8859-6
9arabic
9ASMO-708
9csISOLatinArabic
9ECMA-114
9ISO-8859-6:1987
9iso-ir-127
9ISO_8859-6
10ISO-8859-7
10csISOLatinGreek
10ECMA-118
10ELOT_928
10greek
10greek8
10iso-ir-126
10ISO_8859-7
10ISO_8859-7:1987
11ISO-8859-8
11csISOLatinHebrew
11hebrew
11iso-ir-138
11ISO_8859-8
11ISO_8859-8:1988
12ISO-8859-9
12csISOLatin5
12iso-ir-148
12ISO_8859-9
12ISO_8859-9:1989
12l5
12latin5
13ISO-8859-10
13csISOLatin6
13iso-ir-157
13ISO_8859-10
13ISO_8859-10:1992
13l6
13latin6
109ISO-8859-13
111ISO-8859-15
111Latin-9
113GBK
2025GB2312
2025csGB2312
2025x-mac-chinesesimp
2024Windows-31J
57GB_2312-80
57csISO58GB231280
note

Several rows have the same MIBEnum identifier because a character set can have more than one name (alias).

For more information about the names of character sets, please refer to the following address: http://www.iana.org/assignments/character-sets

After execution of the command, the converted text will be returned in the convertedBLOB blob. This blob can be read by the convertToString command.

See also

convertToString