git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Let's use the Win32 API more precisely
@ 2019-06-27  9:37 Johannes Schindelin via GitGitGadget
  2019-06-27  9:37 ` [PATCH 1/2] mingw: get pw_name in UTF-8 format Johannes Schindelin via GitGitGadget
  2019-06-27  9:37 ` [PATCH 2/2] mingw: use Unicode functions explicitly Johannes Schindelin via GitGitGadget
  0 siblings, 2 replies; 8+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-06-27  9:37 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

For many Win32 functions, there actually exist two variants: one that takes 
const char * ("ANSI", meaning the current code page) and wchar_t * 
("Unicode", i.e. UTF-16, at least for all practical matters).

These functions have "A" and "W" suffixes, respectively, e.g. 
GetFileAttributesW(). The symbols without this suffix are #defined to the 
*W() versions if the constant UNICODE is defined before including the
Windows headers, and to *A() otherwise.

Let's not rely on this constant, but explicitly say what we want: we want
the Unicode versions, as they seem to be used by the ANSI flavor anyway.

Johannes Schindelin (2):
  mingw: get pw_name in UTF-8 format
  mingw: use Unicode functions explicitly

 compat/mingw.c     | 12 +++++++++---
 compat/poll/poll.c |  2 +-
 compat/winansi.c   | 10 ++++++----
 3 files changed, 16 insertions(+), 8 deletions(-)


base-commit: aa25c82427ae70aebf3b8f970f2afd54e9a2a8c6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-147%2Fdscho%2Fansi-unicode-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-147/dscho/ansi-unicode-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/147
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-04 21:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-27  9:37 [PATCH 0/2] Let's use the Win32 API more precisely Johannes Schindelin via GitGitGadget
2019-06-27  9:37 ` [PATCH 1/2] mingw: get pw_name in UTF-8 format Johannes Schindelin via GitGitGadget
2019-07-04 20:13   ` Beat Bolli
2019-07-04 21:52     ` Johannes Schindelin
2019-07-04 21:54       ` Beat Bolli
2019-06-27  9:37 ` [PATCH 2/2] mingw: use Unicode functions explicitly Johannes Schindelin via GitGitGadget
2019-06-27 17:26   ` Eric Sunshine
2019-06-27 18:54     ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).