< Home

set old-encoding-charset mode

Function

The set old-encoding-charset mode command specifies the original encoding format.

Format

set old-encoding-charset mode { gbk | utf-8 }

Parameters

Parameter Description Value
gbk

Indicates that the original encoding format is GBK.

-
utf-8

Indicates that the original encoding format is UTF-8.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The default encoding format is GBK.

When configuring the device using the CLI, administrators can set multiple encoding formats in the terminal software, and the configurations are stored on the device in the corresponding encoding formats. Before switching the encoding format to UTF-8, you must run the language character-set utf-8 command to specify the original encoding format, so that the FW can perform transcoding. Currently, the original encoding format can be GBK or UTF-8. That is, other encoding formats may not be properly transcoded to UTF-8. If the original encoding is unknown, specify any encoding format and run the display language charset conversion preview command to preview the configuration conversion result. If the result is normal without garbled characters, the specified original encoding format is correct.

As the configuration delivered through the web UI can only be in the GBK format, while the configuration delivered through the CLI can be in the UTF-8 format (depending on the CLI terminal), these two encoding formats may co-exist on the FW. In this case, even if the original encoding format is specified, not all configurations can be successfully transcoded.

Example

# Specify the original encoding format to UTF-8 for existing configurations on the device.

<sysname> system-view
[sysname] set old-encoding-charset mode utf-8
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >