From 68effbf0824f0a0ad63c538e4de00e6c80fe1be1 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 8 Jan 2010 17:23:49 +0000 Subject: [PATCH] Fixed a bug in the plaintext catalog add on : in some cases the resulting catalog file was corrupt (checksum error). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34951 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/locale/catalogs/plaintext/Catalog.cpp | 1 + src/tools/locale/PlainTextCatalog.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/add-ons/locale/catalogs/plaintext/Catalog.cpp b/src/add-ons/locale/catalogs/plaintext/Catalog.cpp index e64a4e441f..da4079a1c4 100644 --- a/src/add-ons/locale/catalogs/plaintext/Catalog.cpp +++ b/src/add-ons/locale/catalogs/plaintext/Catalog.cpp @@ -61,6 +61,7 @@ static int16 kCatArchiveVersion = 1; void escapeQuotedChars(BString& stringToEscape) { + stringToEscape.ReplaceAll("\\","\\\\"); stringToEscape.ReplaceAll("\n","\\n"); stringToEscape.ReplaceAll("\t","\\t"); stringToEscape.ReplaceAll("\"","\\\""); diff --git a/src/tools/locale/PlainTextCatalog.cpp b/src/tools/locale/PlainTextCatalog.cpp index d0700705fc..a73c131385 100644 --- a/src/tools/locale/PlainTextCatalog.cpp +++ b/src/tools/locale/PlainTextCatalog.cpp @@ -57,6 +57,7 @@ static int16 kCatArchiveVersion = 1; void escapeQuotedChars(BString& stringToEscape) { + stringToEscape.ReplaceAll("\\","\\\\"); stringToEscape.ReplaceAll("\n","\\n"); stringToEscape.ReplaceAll("\t","\\t"); stringToEscape.ReplaceAll("\"","\\\"");