I have the trouble that I can't see the filename containing the
charactor 'ポ'(0x837c) in a dired buffer.

_mbspbrk() instead of strpbrk() is OK.

Though I don't know about MBCS support well, I think that
using tchar.h is a good solution.

How about the following patch?
-- 
KOBAYASHI Yasuhiro <[EMAIL PROTECTED]>
Index: src/w32.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32.c,v
retrieving revision 1.90
diff -u -r1.90 w32.c
--- src/w32.c	15 Feb 2005 23:19:26 -0000	1.90
+++ src/w32.c	29 Mar 2005 13:49:57 -0000
@@ -74,6 +74,11 @@
 #endif
 #include <windows.h>
 
+#include <tchar.h>
+#ifdef _MBCS	/* MBCS is not supported on Mingw32 */
+#define _tcspbrk _mbspbrk
+#endif
+
 #ifdef HAVE_SOCKETS	/* TCP connection support, if kernel can do it */
 #include <sys/socket.h>
 #undef socket
@@ -713,7 +718,7 @@
   int len = 0;
 
   /* must be valid filename, no wild cards or other invalid characters */
-  if (strpbrk (name, "*?|<>\""))
+  if (_tcspbrk (name, "*?|<>\""))
     return 0;
 
   dir_handle = FindFirstFile (name, &find_data);
@@ -788,7 +793,7 @@
   if (!IS_DIRECTORY_SEP (ptr[0]) || !IS_DIRECTORY_SEP (ptr[1]) || !ptr[2])
     return 0;
 
-  if (strpbrk (ptr + 2, "*?|<>\"\\/"))
+  if (_tcspbrk (ptr + 2, "*?|<>\"\\/"))
     return 0;
 
   return 1;
@@ -2311,7 +2316,7 @@
 
   name = (char *) map_w32_filename (path, &path);
   /* must be valid filename, no wild cards or other invalid characters */
-  if (strpbrk (name, "*?|<>\""))
+  if (_tcspbrk (name, "*?|<>\""))
     {
       errno = ENOENT;
       return -1;
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to