CMP0213 — CMake 4.4.0 Documentation

# CMP0213

Added in version 4.4.

`file(ARCHIVE_CREATE)` and `file(ARCHIVE_EXTRACT)` encode archive paths as UTF-8 by default.

CMake 4.3 and below always used the `OEM` (current locale) encoding for archive paths. CMake 4.4 offer the `ENCODING` option, but prefer to use `UTF-8` by default. This policy provides compatibility for projects that have not been updated to specify the encoding or accept the new default.

The `OLD` behavior for this policy is to use the current locale as the default encoding, which is also known as an `OEM` encoding. The `NEW` behavior uses `UTF-8` as the default encoding.

This policy was introduced in CMake version 4.4. It may be set by `cmake_policy()` or `cmake_minimum_required()`. If it is not set, CMake does not warn, and uses `OLD` behavior.

Note

The `OLD` behavior of a policy is deprecated by definition and may be removed in a future version of CMake.