Filenames encoding (GNAT Reference Manual)

### 11.11 Filenames encoding ¶

An encoding form parameter can be used to specify the filename encoding `encoding=xxx`.

- If the form parameter `encoding=utf8` appears in the form string, the filename must be encoded in UTF-8.
- If the form parameter `encoding=8bits` appears in the form string, the filename must be a standard 8bits string.

In the absence of a `encoding=xxx` form parameter, the encoding is controlled by the `GNAT_CODE_PAGE` environment variable. And if not set `utf8` is assumed.

‘CP_ACP’

  The current system Windows ANSI code page.

‘CP_UTF8’

  UTF-8 encoding

This encoding form parameter is only supported on the Windows platform. On the other Operating Systems the run-time is supporting UTF-8 natively.