]> git.pld-linux.org Git - packages/vim.git/blame - 6.3.080
- new
[packages/vim.git] / 6.3.080
CommitLineData
1c082d99
AM
1To: vim-dev@vim.org
2Subject: Patch 6.3.080 (extra)
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 6.3.080 (extra)
11Problem: Win32: With 'encoding' set to utf-8 while the current codepage is
12 Chinese editing a file with some specific characters in the name
13 fails.
14Solution: Use _wfullpath() instead of _fullpath() when necessary.
15Files: src/os_mswin.c
16
17
18*** ../vim-6.3.079/src/os_mswin.c Sun Dec 5 16:43:06 2004
19--- src/os_mswin.c Sat Jul 2 13:07:35 2005
20***************
21*** 367,385 ****
22 nResult = mch_dirname(buf, len);
23 else
24 #endif
25- if (_fullpath(buf, fname, len - 1) == NULL)
26 {
27! STRNCPY(buf, fname, len); /* failed, use the relative path name */
28! buf[len - 1] = NUL;
29! #ifndef USE_FNAME_CASE
30! slash_adjust(buf);
31 #endif
32 }
33- else
34- nResult = OK;
35
36 #ifdef USE_FNAME_CASE
37 fname_case(buf, len);
38 #endif
39
40 return nResult;
41--- 367,421 ----
42 nResult = mch_dirname(buf, len);
43 else
44 #endif
45 {
46! #ifdef FEAT_MBYTE
47! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage
48! # ifdef __BORLANDC__
49! /* Wide functions of Borland C 5.5 do not work on Windows 98. */
50! && g_PlatformId == VER_PLATFORM_WIN32_NT
51! # endif
52! )
53! {
54! WCHAR *wname;
55! WCHAR wbuf[MAX_PATH];
56! char_u *cname = NULL;
57!
58! /* Use the wide function:
59! * - convert the fname from 'encoding' to UCS2.
60! * - invoke _wfullpath()
61! * - convert the result from UCS2 to 'encoding'.
62! */
63! wname = enc_to_ucs2(fname, NULL);
64! if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH - 1) != NULL)
65! {
66! cname = ucs2_to_enc((short_u *)wbuf, NULL);
67! if (cname != NULL)
68! {
69! STRNCPY(buf, cname, len);
70! buf[len - 1] = NUL;
71! nResult = OK;
72! }
73! }
74! vim_free(wname);
75! vim_free(cname);
76! }
77! if (nResult == FAIL) /* fall back to non-wide function */
78 #endif
79+ {
80+ if (_fullpath(buf, fname, len - 1) == NULL)
81+ {
82+ STRNCPY(buf, fname, len); /* failed, use relative path name */
83+ buf[len - 1] = NUL;
84+ }
85+ else
86+ nResult = OK;
87+ }
88 }
89
90 #ifdef USE_FNAME_CASE
91 fname_case(buf, len);
92+ #else
93+ slash_adjust(buf);
94 #endif
95
96 return nResult;
97*** ../vim-6.3.079/src/version.c Fri Jul 1 11:20:39 2005
98--- src/version.c Mon Jul 4 12:18:34 2005
99***************
100*** 643,644 ****
101--- 643,646 ----
102 { /* Add new patch number below this line */
103+ /**/
104+ 80,
105 /**/
106
107--
108hundred-and-one symptoms of being an internet addict:
109225. You sign up for free subscriptions for all the computer magazines
110
111 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
112/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
113\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
114 \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
This page took 0.035405 seconds and 4 git commands to generate.