[clang] [llvm] [SystemZ][z/OS] Update autoconversion functions to improve support for UTF-8 (PR #98652)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 12 11:52:01 PDT 2024


================
@@ -52,6 +53,12 @@ std::error_code restoreStdHandleAutoConversion(int FD);
 /// \brief Set the tag information for a file descriptor.
 std::error_code setFileTag(int FD, int CCSID, bool Text);
 
+// Get the the tag ccsid for a file name or a file descriptor.
+ErrorOr<__ccsid_t> getFileTag(const char *FileName, const int FD = -1);
+
+// Query the file tag to determine if it needs conversion to UTF-8 codepage.
+ErrorOr<bool> needConversion(const char *FileName, const int FD = -1);
----------------
cor3ntin wrote:

Can we be explicit about functions in this file being zOS specific (ie give them a less generic name)?

https://github.com/llvm/llvm-project/pull/98652


More information about the cfe-commits mailing list