Re: [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales

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

 



Pat Thoyts wrote:
> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

>> --- a/gitk
>> +++ b/gitk
>> @@ -1,6 +1,6 @@
>>  #!/bin/sh
>>  # Tcl ignores the next line -*- tcl -*- \
>> -exec wish "$0" -- "$@"
>> +exec wish -encoding utf-8 "$0" -- "$@"
[...]
> I would much rather see any fault in the makefile fixed than use
> source -encoding in all the various places this script might get
> loaded from.

Good point: git-gui.sh does not use ‘source’ but runs the moral
equivalent of
 
 set wish [info executable]
 eval exec $wish gitk $revs "--" "--"

to avoid starting a shell.  Is it really so expensive to start a
shell?  This means that, for example, if some insane person were to
rewrite gitk in C, then git gui would have to be adjusted before the
result could be used.

> THere are two characters in this file that are not ASCII
> and one of them is in a comment. We could even just use (c) to
> simplify this. However, \u00a9 is the correct unicode escape sequence
> for tcl to get a copyright character into the script in a way that is
> independent of the encoding. The escape sequence should be passed
> through unchanged in any translations - tcl wants to see exactly
> \u00a9 and everyone is using a copyright glyph here. 

So we should fix the Makefile.  The problem is that everything
Tcl-related seems to assume files it sees will be in either the
current locale’s encoding or ISO-8859-1 unless told otherwise, as far
as I can tell.  The entire gitk source tree, on the other hand, is in
UTF-8.

Ideas?
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]