git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Krefting <peter@softwolves.pp.se>
To: Robin Rosenberg <robin.rosenberg@gmail.com>
Cc: msysgit@googlegroups.com, Johannes Sixt <j.sixt@viscovery.net>,
	Alexander Gladysh <agladysh@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [msysGit] Re: Weird filename encoding issue
Date: Mon, 27 Oct 2008 09:08:39 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0810270904490.18631@ds9.cixit.se> (raw)
In-Reply-To: <200810180458.53853.robin.rosenberg@gmail.com>

Robin Rosenberg:

> Git (or msys) under windows is somewhat stupid here as it involves
> the eight-bit locale despite running in a unicode OS. To get UTF-8 on
> XP you can set the codepage to UTF-8 (called 65001 in windows).

That presents itself with a lot of other issues, however, as the
char-based file APIs were only designed to handle up to double-byte
characters. To implement proper Unicode file name support on Windows,
one need to use the "wide" APIs (using wchar_t).

Using those APIs, it does not matter what locale the system is set to.
Everything is then UTF-16, which is trivially converted to and from
UTF-8 (and there are even native APIs to do it if one can't be bothered
to write code for it).

I have been meaning to check out a copy of the Msysgit source tree and
see how difficult it would be to replace the file API layer with proper
Unicode support, but time keeps fleeing from me, so I never seem to get
around to :-/

-- 
\\// Peter - http://www.softwolves.pp.se/

  reply	other threads:[~2008-10-27  8:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17  7:59 Weird filename encoding issue Alexander Gladysh
2008-10-17  8:08 ` Alexander Gladysh
2008-10-17  8:55   ` Johannes Sixt
2008-10-18  2:58     ` Robin Rosenberg
2008-10-27  8:08       ` Peter Krefting [this message]
2008-10-18  6:22     ` Alexander Gladysh
2008-10-18  9:35       ` [msysGit] " Robin Rosenberg
2008-10-18 17:51       ` Johannes Sixt
2008-10-19 14:11         ` [msysGit] " Alexander Gladysh
2008-10-17  8:57   ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0810270904490.18631@ds9.cixit.se \
    --to=peter@softwolves.pp.se \
    --cc=agladysh@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=msysgit@googlegroups.com \
    --cc=robin.rosenberg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).