git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Pratyush Yadav <me@yadavpratyush.com>,
	Luke Bonanomi <lbonanomi@gmail.com>
Subject: Re: [PATCH] git-gui--askpass: coerce answers to UTF-8 on Windows
Date: Wed, 11 Mar 2020 13:17:12 -0700	[thread overview]
Message-ID: <xmqqa74mhcjb.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <pull.578.git.1583954676691.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Wed, 11 Mar 2020 19:24:36 +0000")

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> diff --git a/git-gui--askpass b/git-gui--askpass
> index 4277f30c411..b0704e6d91e 100755
> --- a/git-gui--askpass
> +++ b/git-gui--askpass
> @@ -56,6 +56,11 @@ proc finish {} {
>  		}
>  	}
>  
> +	# On Windows, force the encoding to UTF-8: it is what `git.exe` expects
> +		if {$::tcl_platform(platform) eq {windows}} {

The indentation looks funny here.  Dedent one level?

> +		set ::answer [encoding convertto utf-8 $::answer]
> +	}

Looks correct (assuming that $::answer we got is Unicode "string",
and I think that is a sane assumpton as it came directly from a
textvariable bound to an entry widget).

>  	puts $::answer
>  	set ::rc 0
>  }
>
> base-commit: 63a58457e094c9c9bbf562b872009d32f1f88133

  reply	other threads:[~2020-03-11 20:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 19:24 [PATCH] git-gui--askpass: coerce answers to UTF-8 on Windows Johannes Schindelin via GitGitGadget
2020-03-11 20:17 ` Junio C Hamano [this message]
2020-03-12 21:31 ` [PATCH v2] " Johannes Schindelin via GitGitGadget
2020-03-13  0:11   ` Junio C Hamano
2020-03-14 17:26   ` Pratyush Yadav

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqa74mhcjb.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=lbonanomi@gmail.com \
    --cc=me@yadavpratyush.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).