Re: [PATCH] git-gui--askpass: coerce answers to UTF-8 on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx>
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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux