# What character encoding does configure\_file use?

**URL:** https://discourse.cmake.org/t/what-character-encoding-does-configure-file-use/13387
**Category:** Code
**Created:** [January 13, 2025, 12:45pm UTC](https://discourse.cmake.org/t/what-character-encoding-does-configure-file-use/13387 "2025-01-13T12:45:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![JasonYundt](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jasonyundt/32/5237_2.png) [@JasonYundt](https://discourse.cmake.org/u/JasonYundt)
#### Post date: [January 13, 2025, 12:45pm UTC](https://discourse.cmake.org/t/what-character-encoding-does-configure-file-use/13387/1 "2025-01-13T12:45:15Z")

</div>

I’m currently working on contributing to Descent 3. Descent 3 is an open-source project that uses CMake. Descent 3’s source code is encoded in UTF-8 without any BOMs.

I’m currently working on [a pull request that uses CMake’s `configure_file` command](https://github.com/DescentDevelopers/Descent3/pull/659). When I first created the pull request, I just used `configure_file` without thinking about it, but now I’m realizing that mojibake might be possible. What character encoding does `configure_file` use? Is there anyway to make sure that `configure_file` uses UTF-8 for both the input file and the output file?
