# 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`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://plugins.phbot.org/phbot-api/encoding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
