Skip to content

Commit 448264f

Browse files
authored
Apple's filesystem uses UTF-8 encoding.
1 parent d8f0e64 commit 448264f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llvm/lib/Support/ConvertUTFWrapper.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,11 @@ bool convertGBKToUTF8String(StringRef SrcGBK, std::string &Out) {
264264
return false;
265265
}
266266

267-
#if defined(_WIN32)
267+
#if defined(__APPLE__)
268+
// Apple's filesystem uses UTF-8 encoding.
269+
Out = SrcGBK.str();
270+
return true;
271+
#elif defined(_WIN32)
268272
const char *GBKLocalName = ".936";
269273
#else
270274
const char *GBKLocalName = "zh_CN.GBK";

0 commit comments

Comments
 (0)