Symptom
In ODC V3.1.1 and earlier or ODC V3.2.0, the Chinese data in a GBK encoded file imported from an OceanBase Database tenant in GBK encoding is garbled.
Possible causes
The JDBC driver of ODC V3.1.1 and earlier has a GBK encoding issue, which has been fixed in ODC V2.2.6.
Solutions
Before importing a file in ODC, convert the character set of the file to be imported. Reference script for converting character sets of files in a directory in batch:
SOURCE_DIRECTORY=your_source_directory
TARGET_DIRECTORY=your_target_directory
mkdir -p ${TARGET_DIRECTORY}
find "${SOURCE_DIRECTORY}" -name '*.sql' -exec iconv --verbose -f gbk -t utf-8 -o {} "${TARGET_DIRECTORY}"/{} \;