> For the complete documentation index, see [llms.txt](https://plugins.phbot.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plugins.phbot.org/phbot-api/encoding.md).

# Encoding

## get\_encoding()

This function returns the encoding used by the current Silkroad locale. For iSRO/SilkroadR/cSRO SilkroadR it's `utf-16le` and for vSRO it could be the same or `cp1251`. This is useful if you want to parse certain in game packets (e.g. chat) that could be Unicode.

#### Usage

`get_encoding()`

#### Returns

`string` or `None` if no locale has been selected yet.

* `gb18030`
* `cp1251`
* `big5`
* `sjis`
* `euc-kr`
