Skip to contentSkip to conversation

git-gui: Fix string escaping in po2msg.sh

PATCH New Alexander Gavrilov 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-gui: Fix string escaping in po2msg.sh

Escape '$', because otherwise git-gui crashes while trying to load malformed Japanese localization strings.

---
 po/po2msg.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
po/po2msg.sh +2 -2
index b7c4bf3..1e9f992 100644
@@ -11,8 +11,8 @@ proc u2a {s} {
 	foreach i [split $s ""] {
 		scan $i %c c
 		if {$c<128} {
-			# escape '[', '\' and ']'
-			if {$c == 0x5b || $c == 0x5d} {
+			# escape '[', '\', '$' and ']'
+			if {$c == 0x5b || $c == 0x5d || $c == 0x24} {
 				append res "\\"
 			}
 			append res $i
Signature · 1 line
1.6.0.20.g6148bc