You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/www-apps/rocketwiki-lqfb/files/rocketwiki-lqfb-0.4-utf8.patch

45 lines
1.1 KiB

--- a/rocketwiki-lqfb.hs 2013-04-25 21:41:34.044588280 +0200
+++ b/rocketwiki-lqfb.hs 2013-04-25 21:42:33.108020316 +0200
@@ -2,6 +2,7 @@
import Text.ParserCombinators.Parsec
import Control.Applicative ((<$>), (<*>))
import Data.List (intercalate)
+import System.IO (hSetEncoding, stdin, stdout, utf8)
-----------------------------------------------------
@@ -405,7 +406,10 @@
return htmlEntity
-main = interact wikiParse
+main = do
+ hSetEncoding stdin utf8
+ hSetEncoding stdout utf8
+ interact wikiParse
wikiParse str
| success parseResult = html
--- a/rocketwiki-lqfb-compat.hs 2013-04-25 21:41:41.340518231 +0200
+++ b/rocketwiki-lqfb-compat.hs 2013-04-25 21:43:21.299557312 +0200
@@ -2,6 +2,7 @@
import Text.ParserCombinators.Parsec
import Control.Applicative ((<$>), (<*>))
import Data.List (intercalate)
+import System.IO (hSetEncoding, stdin, stdout, utf8)
-----------------------------------------------------
@@ -412,7 +413,10 @@
return htmlEntity
-main = interact wikiParse
+main = do
+ hSetEncoding stdin utf8
+ hSetEncoding stdout utf8
+ interact wikiParse
wikiParse str
| success parseResult = html