Skip to content

Instantly share code, notes, and snippets.

@papamitra
papamitra / mojicode.hs
Last active December 31, 2015 23:49 — forked from minddnim/mojicode.hs
import Network.HTTP
import Data.ByteString.Lazy.Char8 as B
import Codec.Text.IConv
main :: IO()
main = do
htmlSrc <- openURL "http://flowermaster.web.fc2.com/lrnanido_sara.html"
let src = convert "CP932" "UTF-8" $ B.pack htmlSrc
B.putStrLn src
@papamitra
papamitra / parser.hs
Last active December 31, 2015 20:09 — forked from minddnim/parser.hs
import Data.Attoparsec.ByteString.Char8 as AP
import Data.ByteString.Char8 as B
import Control.Applicative
data MusicData = MusicData {
dID :: Integer,
dLevel :: String,
dMusicTitle :: String,
dBmsID :: Integer,