# Method Stdio.FILE()->set_charset()

Method set_charset

  ``void` set_charset(`string`|`void` `charset`)`

Description

  Sets the input and output charset of this file to the specified `charset`. If `charset` is 0 or not specified the environment is used to try to detect a suitable charset.

  The default charset if this function is not called is `"ISO-8859-1"`.

FIXME

  Consider using one of ISO-IR-196 (`"\e%G"` - switch to UTF-8 with return) or ISO-IR-190 (`"\e%/G"` - switch to UTF-8 level 1 no return) or ISO-IR-191 (`"\e%/H"` - switch to UTF-8 level 2 no return) or ISO-IR-192 (`"\e%/I"` - switch to UTF-8 level 3 no return) or ISO-IR-193 (`"\e%/J"` - switch to UTF-16 level 1 no return) or ISO-IR-194 (`"\e%/K"` - switch to UTF-16 level 2 no return) or ISO-IR-195 (`"\e%/L"` - switch to UTF-16 level 3 no return) or ISO-IR-162 (`"\e%/@"` - switch to UCS-2 level 1) or ISO-IR-163 (`"\e%/A"` - switch to UCS-4 level 1) or ISO-IR-174 (`"\e%/C"` - switch to UCS-2 level 2) or ISO-IR-175 (`"\e%/D"` - switch to UCS-4 level 2) or ISO-IR-176 (`"\e%/E"` - switch to UCS-2 level 3) or ISO-IR-177 (`"\e%/F"` - switch to UCS-4 level 3) or ISO-IR-178 (`"\e%B"` - switch to UTF-1) automatically to encode wide strings.