Skip to main content

Module encoding

Module encoding 

Source
Expand description

Global encoding for Rust <-> AMX conversion (only with the encoding feature).

The original SA-MP operates on 8-bit encodings (Western Windows-1252 by default, Windows-1251 for Cyrillic on Russian servers). This module lets the plugin configure the encoding once in on_load — after that, AmxString decodes and Buffer::write_str encodes using it automatically.

Statics§

WINDOWS_1251
The windows-1251 encoding.
WINDOWS_1252
The windows-1252 encoding.

Functions§

set_default_encoding
Sets the global encoding used in every AMX string conversion.