Skip to content

MSC /utf-8 vs /execution-charset:utf-8 #4673

@torsten48

Description

@torsten48

fmt CMakeLists.txt with option FMT_UNICODE=ON enforces /utf-8 to allow UNICODE (UTF8) using MSC/clang-cl on Windows.
/utf-8 is a combination of two switches, /execution-charset:utf-8 and /source-charset:utf-8.
fmt works very well with just /execution-charset:utf-8 and coding utf literals via "\uXX" sequences (and set of FMT_UNICODE = OFF).
With /utf-8 (and as a result /source-charset:utf-8) the usage of utf8 encoded source files are forced.
There is imho no need to enforce utf8 source file encoding.
I would like to replace /utf-8 by /execution-charset:utf-8

Personal background: I'm still using a very special folding editor (Andys Editor, ae), unfortunately not compatible with codepage 65002 (utf8), so /source-charset:utf-8 is a pain for me.

Addition:
The fmt code does not care about FMT_UNICODE, maybe the whole cmake option is obsolete. The compiler itself complains if /execution-charset:utf-8 is not set and utf "\uXX" literals are used, and it also complains if unescaped utf8 is found in the sources while /source-charset:utf-8 is not specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions