AUDIT: r17257 - gnucash/trunk/src/app-utils - Bug #526883: Add a few missing conversions of strftime results to utf-8.

Andreas Köhler andi5 at cvs.gnucash.org
Sun Jul 6 07:11:34 EDT 2008


Author: andi5
Date: 2008-07-06 07:11:34 -0400 (Sun, 06 Jul 2008)
New Revision: 17257
Trac: http://svn.gnucash.org/trac/changeset/17257

Modified:
   gnucash/trunk/src/app-utils/date-utilities.scm
Log:
Bug #526883: Add a few missing conversions of strftime results to utf-8.

Strings returned by the c runtime must be converted to utf-8 to be
displayed properly in all cases.

BP


Modified: gnucash/trunk/src/app-utils/date-utilities.scm
===================================================================
--- gnucash/trunk/src/app-utils/date-utilities.scm	2008-07-05 22:31:09 UTC (rev 17256)
+++ gnucash/trunk/src/app-utils/date-utilities.scm	2008-07-06 11:11:34 UTC (rev 17257)
@@ -20,6 +20,8 @@
 ;; 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
 ;; Boston, MA  02110-1301,  USA       gnu at gnu.org
 
+(use-modules (gnucash core-utils))
+
 (define gnc:reldate-list '())
 
 (define (gnc:timepair->secs tp)
@@ -79,7 +81,7 @@
   (gnc:date-get-year-day (gnc:timepair->date tp)))
 
 (define (gnc:date-get-year-string datevec)
-  (strftime "%Y" datevec))
+  (gnc-locale-to-utf8 (strftime "%Y" datevec)))
 
 (define (gnc:date-get-quarter-string datevec)
   (sprintf #f "Q%d" (gnc:date-get-quarter datevec)))
@@ -91,10 +93,10 @@
    (gnc:date-get-year-string datevec)))
 
 (define (gnc:date-get-month-string datevec)
-  (strftime "%B" datevec))
+  (gnc-locale-to-utf8 (strftime "%B" datevec)))
 
 (define (gnc:date-get-month-year-string datevec)
-  (strftime "%B %Y" datevec))
+  (gnc-locale-to-utf8 (strftime "%B %Y" datevec)))
 
 (define (gnc:date-get-week-year-string datevec)
   (let ((begin-string (gnc-print-date



More information about the gnucash-changes mailing list