r17281 - gnucash/branches/2.2/src/app-utils - [r17257] Bug #526883: Add a few missing conversions of strftime results to utf-8.
Christian Stimming
cstim at cvs.gnucash.org
Mon Jul 7 16:57:17 EDT 2008
Author: cstim
Date: 2008-07-07 16:57:17 -0400 (Mon, 07 Jul 2008)
New Revision: 17281
Trac: http://svn.gnucash.org/trac/changeset/17281
Modified:
gnucash/branches/2.2/src/app-utils/date-utilities.scm
Log:
[r17257] 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.
Originally by andi5.
Modified: gnucash/branches/2.2/src/app-utils/date-utilities.scm
===================================================================
--- gnucash/branches/2.2/src/app-utils/date-utilities.scm 2008-07-07 20:57:08 UTC (rev 17280)
+++ gnucash/branches/2.2/src/app-utils/date-utilities.scm 2008-07-07 20:57:17 UTC (rev 17281)
@@ -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)
@@ -72,7 +74,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)))
@@ -84,10 +86,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)))
;; is leap year?
(define (gnc:leap-year? year)
More information about the gnucash-changes
mailing list