[PATCH] D153418: Adding iconv support to CharSetConverter class
Abhina Sree via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 22 10:31:57 PDT 2023
abhina.sreeskantharajan added a comment.
In D153418#4441603 <https://reviews.llvm.org/D153418#4441603>, @efriedma wrote:
> Even if we do decide we have to use platform-specific facilities because there's no suitable library, I think we should at least have a hardcoded set of encodings we recognize, so we aren't passing arbitrary encoding names directly from the command-line to the iconv() call.
>
> Do you have a list of specific encodings you care about?
I think this is reasonable since gcc's fexec-charset option also says the name can be any encoding supported by the iconv library (copy pasted below from https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc.pdf) so this would match that behaviour. Unfortunately, I don't think we are able to provide a hardcoded list because the locales installed can differ between machines and the only thing we can guarantee is -fexec-charset=utf-8 is always supported.
-fexec-charset=charset
Set the execution character set, used for string and character constants. The
default is UTF-8. charset can be any encoding supported by the system’s iconv
library routine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153418/new/
https://reviews.llvm.org/D153418
More information about the cfe-commits
mailing list