Bug 797746 - [reports] German umlauts not escaped

Resume using libintl directly. Guile apparently passes gettext msgstrs
through scm_from_locale_string instead of scm_from_utf8_string.
pull/734/head
John Ralls 6 years ago
parent 55aadc0b1a
commit b5aeca94b6

@ -29,6 +29,8 @@
#include <gnc-locale-utils.h>
#include <glib.h>
#include <gnc-version.h>
#include <libintl.h>
%}
#if defined(SWIGGUILE)
%{
@ -154,6 +156,8 @@ gchar *gnc_locale_name (void);
}
%rename ("gnc:gettext") gettext;
extern const char* gettext(const char*);
%rename ("gnc-utf8?") wrap_gnc_utf8_validate;
%inline %{
/* This helper function wraps gnc_utf8_validate() into a predicate. */
@ -162,6 +166,7 @@ gchar *gnc_locale_name (void);
{
return gnc_utf8_validate(str, -1, 0);
}
%}
#elif defined(SWIGPYTHON)
gboolean gnc_utf8_validate(const gchar *, gssize, const gchar**);

@ -38,7 +38,7 @@
(define-public gnc:version (gnc-version))
;; gettext functions
(define-public _ gettext)
(define-public _ gnc:gettext)
(define-syntax N_
(syntax-rules ()
((_ x) x)))

Loading…
Cancel
Save