You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I was messing around with some non-ASCII text conversion and found out that MSVC need an extra flag to suppor UTF-8 inputs.
After further investigation I found that different compilers like GCC and MSVC use different options for such tasks (because of course they do), so it would be neat if XMake could detect these flags or even have a different set_ command for these tasks
ifis_plat("windows") thenadd_cxflags("/utf8")
elseadd_cxflags("-fexec-charset=UTF-8", "-fextended-identifiers", "-finput-charset=UTF-8")
end
This does not seem to require complex configuration, and xmake will also automatically ignore these flags if they are not supported by the current compiler.
I need to think carefully about adding new interfaces, because I don't want to add too many unless it's a very necessary interface.
Of course, if more people feel that adding set_encodings is necessary, then I'll consider it as well.
Is your feature request related to a problem? Please describe.
I was messing around with some non-ASCII text conversion and found out that MSVC need an extra flag to suppor UTF-8 inputs.
After further investigation I found that different compilers like GCC and MSVC use different options for such tasks (because of course they do), so it would be neat if XMake could detect these flags or even have a different set_ command for these tasks
Describe the solution you'd like
Adding a command like set_encoding("UTF-8") would cause XMake to omit compiler options such as
/utf8 for msvc
or
-fexec-charset=UTF-8 -fextended-identifiers -finput-charset=UTF-8 for GCC
I think clang by default supports UTF-8 (needs further research)
Describe alternatives you've considered
Including these options into compiler options mappings, i guess?
Additional context
No response
The text was updated successfully, but these errors were encountered: