To: vim_dev@googlegroups.com Subject: Patch 8.1.1725 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1725 Problem: MS-Windows: E325 message may use incorrect date format. Solution: Convert strftime() result to 'encoding'. Also make the message translatable. (Ken Takata, closes #4685, closes #4681) Files: src/memline.c *** ../vim-8.1.1724/src/memline.c 2019-07-17 22:55:30.767036831 +0200 --- src/memline.c 2019-07-21 15:01:23.871213396 +0200 *************** *** 2142,2148 **** if (curtime == NULL) vim_strncpy((char_u *)buf, (char_u *)_("(Invalid)"), sizeof(buf) - 1); else ! (void)strftime(buf, sizeof(buf) - 1, "%a %b %d %H:%M:%S %Y", curtime); #else STRCPY(buf, "(unknown)"); #endif --- 2142,2165 ---- if (curtime == NULL) vim_strncpy((char_u *)buf, (char_u *)_("(Invalid)"), sizeof(buf) - 1); else ! { ! (void)strftime(buf, sizeof(buf) - 1, _("%a %b %d %H:%M:%S %Y"), ! curtime); ! # ifdef MSWIN ! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ! { ! char_u *to_free = NULL; ! int len; ! ! acp_to_enc((char_u *)buf, (int)strlen(buf), &to_free, &len); ! if (to_free != NULL) ! { ! STRCPY(buf, to_free); ! vim_free(to_free); ! } ! } ! # endif ! } #else STRCPY(buf, "(unknown)"); #endif *** ../vim-8.1.1724/src/version.c 2019-07-21 14:50:15.383092355 +0200 --- src/version.c 2019-07-21 15:05:46.898084413 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1725, /**/ -- The MS-Windows registry is no more hostile than any other bunch of state information... that is held in a binary format... a format that nobody understands... and is replicated and cached in a complex and largely undocumented way... and contains large amounts of duplicate and obfuscated information... (Ben Peterson) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///