git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH (GIT-GUI MSYSGIT FIX)] git-gui: Fix string escaping in po2msg.sh

From
Alexander Gavrilov <angavrilov@gmail.com>
Date
Aug 30, 2008, 21:12 UTC
Message-ID
<200808310112.26506.angavrilov@gmail.com>

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

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
 po/po2msg.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/po/po2msg.sh b/po/po2msg.sh
index b7c4bf3..1e9f992 100644
--- a/po/po2msg.sh
+++ b/po/po2msg.sh
@@ -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
-- 
1.6.0.20.g6148bc
Message 1 of 1 in “git-gui: Fix string escaping in po2msg.sh”
  1. git-gui: Fix string escaping in po2msg.shAlexander Gavrilov, Aug 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.