2019-12-21 17:15:02 -08:00
|
|
|
---
|
|
|
|
|
title: interactive / set_encoding
|
|
|
|
|
---
|
2023-11-25 09:50:24 -08:00
|
|
|
# set_encoding
|
2019-12-21 17:15:02 -08:00
|
|
|
|
|
|
|
|
### SYNOPSIS
|
|
|
|
|
|
|
|
|
|
string set_encoding( string encoding | void );
|
|
|
|
|
|
|
|
|
|
### DESCRIPTION
|
|
|
|
|
|
|
|
|
|
set output/input encoding for current player.
|
|
|
|
|
|
|
|
|
|
If given encoding name is not avaiable, a error will be thrown. The avaiable encoding name
|
|
|
|
|
depends on your ICU version, Generally, use GBK for chinese.
|
|
|
|
|
|
|
|
|
|
If no argument present, reset the player to no encoding, which means UTF-8.
|
|
|
|
|
|
|
|
|
|
Returns the canonical encoding name from ICU, and it will be the same as query_encoding() returns.
|
|
|
|
|
|
|
|
|
|
### SEE ALSO
|
|
|
|
|
|
|
|
|
|
query_encoding(3)
|