ok,it has txt extension now

Alvin Wong <[email protected]> 于2023年3月20日周一 18:10写道:

> Hi, if you attached a patch in your mail, it has been stripped by the
> mailing list software. Please try renaming it to `.txt` and resend.
>
> On 20/3/2023 16:55, 傅继晗 wrote:
> > Hello maintainers:
> >
> > According to microsoft page:setlocale, _wsetlocale | Microsoft Learn
> > <
> https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-170
> >
> >
> > *Starting in Windows 10 version 1803 (10.0.17134.0), the Universal C
> > Runtime supports using a UTF-8 code page. The change means that char
> > strings passed to C runtime functions can expect strings in the UTF-8
> > encoding.*
> >
> > But the libmingwex.a in toolchain of Mingw-w64-public  doesn't support
> > non-ascii file name,and cause some bugs in  project,see :
> > MinGW-w64 - for 32 and 64 bit Windows / Bugs / #227 basename() truncates
> > filenames with variable-width encoding (sourceforge.net)
> > <https://sourceforge.net/p/mingw-w64/bugs/227/>
> > and AOSP adb pull push error
> > Google Issue Tracker <https://issuetracker.google.com/issues/143232373>
> >
> > so,the patches for dirname.c and basename.c is needed to support utf-8
> > encoding.
> >
> > Greetings
> >
> > fjh1997
> >
> > _______________________________________________
> > Mingw-w64-public mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
From 9334d5b8302b81a34630de6e6e940118b043d4e2 Mon Sep 17 00:00:00 2001
From: FunnyBiu <[email protected]>
Date: Mon, 20 Mar 2023 16:50:52 +0800
Subject: [PATCH] Update dirname.c

---
 mingw-w64-crt/misc/dirname.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-crt/misc/dirname.c b/mingw-w64-crt/misc/dirname.c
index 9c5cf87db..ee950ce0b 100644
--- a/mingw-w64-crt/misc/dirname.c
+++ b/mingw-w64-crt/misc/dirname.c
@@ -40,7 +40,7 @@ dirname(char *path)
 
   if (locale != NULL)
     locale = strdup (locale);
-  setlocale (LC_CTYPE, "");
+  setlocale (LC_CTYPE, ".UTF8");
 
   if (path && *path)
     {
From 5bc55b91d51eae0ec92672a3cad86b4ee0fd3e7a Mon Sep 17 00:00:00 2001
From: FunnyBiu <[email protected]>
Date: Mon, 20 Mar 2023 16:48:30 +0800
Subject: [PATCH] Update basename.c

---
 mingw-w64-crt/misc/basename.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-crt/misc/basename.c b/mingw-w64-crt/misc/basename.c
index c45dbbb36..9ae811cd9 100644
--- a/mingw-w64-crt/misc/basename.c
+++ b/mingw-w64-crt/misc/basename.c
@@ -41,7 +41,7 @@ basename (char *path)
 
   if (locale != NULL)
     locale = strdup (locale);
-  setlocale (LC_CTYPE, "");
+  setlocale (LC_CTYPE, ".UTF8");
 
   if (path && *path)
     {
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to