mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-23 01:16:43 -06:00
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.
This commit is contained in:
parent
55aadc0b1a
commit
b5aeca94b6
@ -29,6 +29,8 @@
|
|||||||
#include <gnc-locale-utils.h>
|
#include <gnc-locale-utils.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gnc-version.h>
|
#include <gnc-version.h>
|
||||||
|
#include <libintl.h>
|
||||||
|
|
||||||
%}
|
%}
|
||||||
#if defined(SWIGGUILE)
|
#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;
|
%rename ("gnc-utf8?") wrap_gnc_utf8_validate;
|
||||||
%inline %{
|
%inline %{
|
||||||
/* This helper function wraps gnc_utf8_validate() into a predicate. */
|
/* 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);
|
return gnc_utf8_validate(str, -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
%}
|
%}
|
||||||
#elif defined(SWIGPYTHON)
|
#elif defined(SWIGPYTHON)
|
||||||
gboolean gnc_utf8_validate(const gchar *, gssize, const gchar**);
|
gboolean gnc_utf8_validate(const gchar *, gssize, const gchar**);
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
(define-public gnc:version (gnc-version))
|
(define-public gnc:version (gnc-version))
|
||||||
;; gettext functions
|
;; gettext functions
|
||||||
(define-public _ gettext)
|
(define-public _ gnc:gettext)
|
||||||
(define-syntax N_
|
(define-syntax N_
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ x) x)))
|
((_ x) x)))
|
||||||
|
Loading…
Reference in New Issue
Block a user