since per the Nim Manual source files are in the UTF-8 encoding, it's probably safe to assume that string literals are UTF-8 https://nim-lang.org/docs/manual.html#lexical-analysis-encoding > All Nim source files are in the UTF-8 encoding (or its ASCII subset). Other encodings are not supported. but the bytes in a Nim string don't actually assume any particular encoding: https://nim-lang.org/docs/manual.html#types-string-type > Per convention, all strings are UTF-8 strings, but this is not enforced. For example, when reading strings from binary files, they are merely a sequence of bytes. just something to be aware of when working with arbitrary data coming from files, network, etc.