convertEncode

Syntax

convertEncode(str, srcEncode, destEncode)

Arguments

str is a STRING scalar/vector.

srcEncode is a string indicating the original encoding name.

destEncode is a string indicating the new encoding name.

Details

Change the encoding of strings. All encoding names must use lowercase.

The Linux version supports conversion between any two encodings. The Windows version only supports conversion between GBK and UTF-8.

Examples

convertEncode("high-performance time-series database","utf-8","gbk");
// output
high-performance time-series database

convertEncode(["hello","DolphinDB"],"gbk","utf-8");
// output
["hello","DolphinDB"]

Related functions: fromUTF8, toUTF8