I combed through the Using the compiler section in the Solidity documentation, but I couldn't find an answer for my question.
Do file names need to be valid UTF-8 for solc to be able to compile them?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI combed through the Using the compiler section in the Solidity documentation, but I couldn't find an answer for my question.
Do file names need to be valid UTF-8 for solc to be able to compile them?
The Solidity Compiler (solc) is implemented in C++ (see here).
It uses std::string
conclusively, and that includes file names.
Subsequently, whatever string format is supported by this type, is also the string format which you must use when passing file names as input to the compiler.
std::string
enforce UTF-8? I am not familiar with C++.
Dec 26, 2020 at 17:04
std:::string
, as you can see in the source code.std:::string
conclusively. So whatever string format is supported by this type, is also supported by the compiler for file paths and names.