Fix for decoding problem in datetime plugin

(upstream git commit 1d20b99ec742ce08a8083a01ccb15adb763815e1)
This commit is contained in:
dcoppa 2013-09-12 17:25:43 +00:00
parent 983e0ab6ba
commit 3abf3a891f
2 changed files with 21 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.26 2013/08/19 12:02:07 dcoppa Exp $
# $OpenBSD: Makefile,v 1.27 2013/09/12 17:25:43 dcoppa Exp $
COMMENT = minimalistic text based status bar
DISTNAME = xmobar-0.18
REVISION = 3
REVISION = 4
CATEGORIES = x11
HOMEPAGE = http://projects.haskell.org/xmobar

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-src_Localize_hsc,v 1.1 2013/09/12 17:25:43 dcoppa Exp $
commit 1d20b99ec742ce08a8083a01ccb15adb763815e1
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Date: Thu Aug 29 17:55:50 2013 +0200
Fix for decoding problem in datetime plugin
--- src/Localize.hsc.orig Wed Jun 5 00:37:16 2013
+++ src/Localize.hsc Thu Sep 12 19:19:35 2013
@@ -46,7 +46,7 @@ getLangInfo item = do
itemStr <- nl_langinfo item
#ifdef UTF8
str <- peekCString itemStr
- return $ decodeString str
+ return $ if (isUTF8Encoded str) then decodeString str else str
#else
peekCString itemStr
#endif