From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: KOBAYASHI Yasuhiro Newsgroups: gmane.emacs.devel Subject: x-file-dialog in w32fns.c Date: Thu, 15 Jul 2004 23:43:38 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1089902649 14554 80.91.224.253 (15 Jul 2004 14:44:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2004 14:44:09 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jul 15 16:43:36 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bl7SR-0004vy-00 for ; Thu, 15 Jul 2004 16:43:35 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bl7SQ-0007X0-00 for ; Thu, 15 Jul 2004 16:43:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bl7Uu-000325-A0 for emacs-devel@quimby.gnus.org; Thu, 15 Jul 2004 10:46:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bl7Uk-00031i-Px for emacs-devel@gnu.org; Thu, 15 Jul 2004 10:45:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bl7Ui-00030l-HY for emacs-devel@gnu.org; Thu, 15 Jul 2004 10:45:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bl7Ui-00030i-Dm for emacs-devel@gnu.org; Thu, 15 Jul 2004 10:45:56 -0400 Original-Received: from [202.248.37.211] (helo=mail503.nifty.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bl7Ry-0003KY-EN for emacs-devel@gnu.org; Thu, 15 Jul 2004 10:43:06 -0400 Original-Received: from NSZ124 (sttkmt012199.adsl.ppp.infoweb.ne.jp [220.145.69.199])by mail503.nifty.com with ESMTP id i6FEgfml001245 for ; Thu, 15 Jul 2004 23:42:42 +0900 Original-To: emacs-devel@gnu.org X-Face: sx{*Zd5t@lP<&#~%3p=Z'z@ru$R6Bvwu3`mD?-!>[pr@Do`[`tu-$[0\OB6%gb:z/7 iuq3LblNTXV@AU\/w=hI[\w}\Hr1UM~>x\cQtaXq&w:LcZn/yvAOIHk"^$laja@tc|:Y"DC]/F!W"D "*_Y$vOKK5 X-PGP-DSS: BE16 34D8 BC0B 52B5 0E86 9D4B 9B89 77B3 1D8D A872 X-PGP-Key: http://homepage3.nifty.com/y3tk/gpg/pubkey.asc User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (i386-mingw-nt5.1.2600) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25725 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25725 Hi, In Japan, Windowz users sometimes use Multibyte filenames. I find that there is the strange characters in file dialog. The following patch fix that. --- /home/kobayays/w32fns.c~ 2004-07-15 23:14:52.000000000 +0900 +++ /home/kobayays/w32fns.c 2004-07-15 23:16:16.000000000 +0900 @@ -7735,14 +7735,14 @@ /* Create the dialog with PROMPT as title, using DIR as initial directory and using "*" as pattern. */ dir = Fexpand_file_name (dir, Qnil); - strncpy (init_dir, SDATA (dir), MAX_PATH); + strncpy (init_dir, SDATA (ENCODE_SYSTEM (dir)), MAX_PATH); init_dir[MAX_PATH] = '\0'; unixtodos_filename (init_dir); if (STRINGP (default_filename)) { char *file_name_only; - char *full_path_name = SDATA (default_filename); + char *full_path_name = SDATA (ENCODE_SYSTEM (default_filename)); unixtodos_filename (full_path_name); -- KOBAYASHI Yasuhiro