diff --git a/Changes.md b/Changes.md
new file mode 100644
--- /dev/null
+++ b/Changes.md
@@ -0,0 +1,7 @@
+# Change log for the `gnuplot` Haskell binding
+
+## 0.5.5:
+
+ * `Gnuplot.Utility.quote` bugfix:
+   Do not escape printable non-ASCII characters
+   because gnuplot has no universal escaping support for Unicode codepoints.
diff --git a/gnuplot.cabal b/gnuplot.cabal
--- a/gnuplot.cabal
+++ b/gnuplot.cabal
@@ -1,5 +1,5 @@
 Name:             gnuplot
-Version:          0.5.4.2
+Version:          0.5.5
 License:          BSD3
 License-File:     LICENSE
 Author:           Henning Thielemann <haskell@henning-thielemann.de>
@@ -41,6 +41,7 @@
 Build-Type:        Simple
 Extra-Source-Files:
   Makefile
+  Changes.md
   execute/tmp/Graphics/Gnuplot/Execute.hs
   execute/pipe/Graphics/Gnuplot/Execute.hs
   execute/shell/Graphics/Gnuplot/Execute.hs
@@ -50,7 +51,7 @@
   data/runtime.data
 
 Source-Repository this
-  Tag:         0.5.4.2
+  Tag:         0.5.5
   Type:        darcs
   Location:    http://code.haskell.org/gnuplot/
 
@@ -113,6 +114,7 @@
     Graphics.Gnuplot.Terminal.SVG
     Graphics.Gnuplot.Terminal.WXT
     Graphics.Gnuplot.Terminal.X11
+    Graphics.Gnuplot.Encoding
     Graphics.Gnuplot.Frame
     Graphics.Gnuplot.Frame.Option
     Graphics.Gnuplot.Frame.OptionSet
@@ -144,6 +146,7 @@
     Graphics.Gnuplot.Private.Graph3DType
     Graphics.Gnuplot.Private.GraphEmpty
     Graphics.Gnuplot.Private.Terminal
+    Graphics.Gnuplot.Private.Encoding
     Graphics.Gnuplot.Private.Display
     Graphics.Gnuplot.Private.File
     Graphics.Gnuplot.Private.Command
diff --git a/src/Graphics/Gnuplot/Encoding.hs b/src/Graphics/Gnuplot/Encoding.hs
new file mode 100644
--- /dev/null
+++ b/src/Graphics/Gnuplot/Encoding.hs
@@ -0,0 +1,53 @@
+{- |
+Support for special characters
+
+Gnuplot has no universal Unicode escaping mechanism,
+you can only work with encodings.
+However, not all terminals support all encodings,
+not all terminals even support utf-8.
+Some terminals seem to support only one encoding.
+E.g. WX seems to support only UTF-8,
+X11 seems to support only Latin-1.
+Postscript, SVG, PNG seem to support both UTF-8 and Latin-1.
+
+The @gnuplot@ Haskell bindings
+always write using the system-wide default encoding.
+Thus it is better not to set an encoding other than 'locale' explicitly.
+However, if you write the files yourself in a certain encoding
+you should use the @encoding@ option of the according terminal.
+-}
+module Graphics.Gnuplot.Encoding (
+   T,
+   locale, deflt,
+   iso_8859_1, iso_8859_15, iso_8859_2, iso_8859_9,
+   koi8r, koi8u,
+   cp437, cp850, cp852, cp950, cp1250, cp1251, cp1254,
+   sjis, utf8,
+   ) where
+
+import Graphics.Gnuplot.Private.Encoding (T(Cons))
+
+
+locale, deflt,
+   iso_8859_1, iso_8859_15, iso_8859_2, iso_8859_9,
+   koi8r, koi8u,
+   cp437, cp850, cp852, cp950, cp1250, cp1251, cp1254,
+   sjis, utf8 :: T
+
+locale      = Cons "locale"
+deflt       = Cons "default"
+iso_8859_1  = Cons "iso_8859_1"
+iso_8859_15 = Cons "iso_8859_15"
+iso_8859_2  = Cons "iso_8859_2"
+iso_8859_9  = Cons "iso_8859_9"
+koi8r       = Cons "koi8r"
+koi8u       = Cons "koi8u"
+cp437       = Cons "cp437"
+cp850       = Cons "cp850"
+cp852       = Cons "cp852"
+cp950       = Cons "cp950"
+cp1250      = Cons "cp1250"
+cp1251      = Cons "cp1251"
+cp1254      = Cons "cp1254"
+sjis        = Cons "sjis"
+utf8        = Cons "utf8"
diff --git a/src/Graphics/Gnuplot/Private/Encoding.hs b/src/Graphics/Gnuplot/Private/Encoding.hs
new file mode 100644
--- /dev/null
+++ b/src/Graphics/Gnuplot/Private/Encoding.hs
@@ -0,0 +1,11 @@
+module Graphics.Gnuplot.Private.Encoding where
+
+import Graphics.Gnuplot.Utility (listFromMaybeWith)
+
+newtype T = Cons String
+
+format :: T -> String
+format (Cons enc) = "set encoding " ++ enc
+
+formatMaybe :: Maybe T -> [String]
+formatMaybe = listFromMaybeWith format
diff --git a/src/Graphics/Gnuplot/Private/Plot.hs b/src/Graphics/Gnuplot/Private/Plot.hs
--- a/src/Graphics/Gnuplot/Private/Plot.hs
+++ b/src/Graphics/Gnuplot/Private/Plot.hs
@@ -23,7 +23,7 @@
 import qualified System.FilePath as Path
 import System.FilePath (FilePath, (</>), )
 
-import Prelude (Functor, fmap, String, show, Int, succ, writeFile, undefined, )
+import Prelude (Functor, fmap, String, show, Int, succ, writeFile, )
 
 
 {- |
diff --git a/src/Graphics/Gnuplot/Private/Terminal.hs b/src/Graphics/Gnuplot/Private/Terminal.hs
--- a/src/Graphics/Gnuplot/Private/Terminal.hs
+++ b/src/Graphics/Gnuplot/Private/Terminal.hs
@@ -2,6 +2,7 @@
 
 data T =
    Cons {
+      precommands :: [String],
       options :: [String],
       commands :: [String],
       interactive :: Bool
@@ -11,7 +12,8 @@
    canonical :: terminal -> T
 
 format :: T -> [String]
-format (Cons opts cmds _ia) =
+format (Cons pre opts cmds _ia) =
+   pre ++
    if null opts
      then cmds
      else (unwords $ "set" : "terminal" : opts) : cmds
diff --git a/src/Graphics/Gnuplot/Terminal/Default.hs b/src/Graphics/Gnuplot/Terminal/Default.hs
--- a/src/Graphics/Gnuplot/Terminal/Default.hs
+++ b/src/Graphics/Gnuplot/Terminal/Default.hs
@@ -14,6 +14,7 @@
 instance Terminal.C T where
    canonical _term =
       Terminal.Cons {
+         Terminal.precommands = [],
          Terminal.options = [],
          Terminal.commands = [],
          Terminal.interactive = True  -- Always true? I don't know.
diff --git a/src/Graphics/Gnuplot/Terminal/PNG.hs b/src/Graphics/Gnuplot/Terminal/PNG.hs
--- a/src/Graphics/Gnuplot/Terminal/PNG.hs
+++ b/src/Graphics/Gnuplot/Terminal/PNG.hs
@@ -1,5 +1,6 @@
 module Graphics.Gnuplot.Terminal.PNG (
    T, cons,
+   encoding,
    transparent, noTransparent,
    interlace, noInterlace,
    trueColor, noTrueColor,
@@ -7,6 +8,7 @@
    ) where
 
 import qualified Graphics.Gnuplot.Private.Terminal as Terminal
+import qualified Graphics.Gnuplot.Private.Encoding as Encoding
 import Data.Maybe (catMaybes, )
 import Graphics.Gnuplot.Utility (quote, formatBool, )
 
@@ -14,6 +16,7 @@
 data T =
    Cons {
       filename_ :: FilePath,
+      encoding_ :: Maybe Encoding.T,
       transparent_ :: Maybe Bool,
       interlace_ :: Maybe Bool,
       trueColor_ :: Maybe Bool,
@@ -24,6 +27,7 @@
 cons path =
    Cons {
       filename_ = path,
+      encoding_ = Nothing,
       transparent_ = Nothing,
       interlace_ = Nothing,
       trueColor_ = Nothing,
@@ -31,6 +35,13 @@
    }
 
 
+{- |
+Setting the encoding to anything different
+from 'Graphics.Gnuplot.Encoding.locale'
+makes only sense if you write your gnuplot files manually using this encoding.
+-}
+encoding :: Encoding.T -> T -> T
+encoding enc term = term{encoding_ = Just enc}
 
 transparent, noTransparent :: T -> T
 transparent   term = term{transparent_ = Just True}
@@ -77,6 +88,7 @@
 instance Terminal.C T where
    canonical term =
       Terminal.Cons {
+         Terminal.precommands = Encoding.formatMaybe $ encoding_ term,
          Terminal.options =
             "png" :
             catMaybes (
diff --git a/src/Graphics/Gnuplot/Terminal/PostScript.hs b/src/Graphics/Gnuplot/Terminal/PostScript.hs
--- a/src/Graphics/Gnuplot/Terminal/PostScript.hs
+++ b/src/Graphics/Gnuplot/Terminal/PostScript.hs
@@ -1,18 +1,21 @@
 module Graphics.Gnuplot.Terminal.PostScript (
    T, cons,
+   encoding,
    landscape, portrait, eps,
    color, monochrome,
    font, embedFont,
    ) where
 
 import qualified Graphics.Gnuplot.Private.Terminal as Terminal
-import Graphics.Gnuplot.Utility (quote, )
-import Data.Maybe (maybeToList, )
+import qualified Graphics.Gnuplot.Private.Encoding as Encoding
+import Graphics.Gnuplot.Utility (listFromMaybeWith, quote, )
+import Data.Foldable (foldMap, )
 
 
 data T =
    Cons {
       filename_ :: FilePath,
+      encoding_ :: Maybe Encoding.T,
       mode_ :: Maybe Mode,
       color_ :: Maybe Bool,
       embedFont_ :: [FilePath],
@@ -23,6 +26,7 @@
 cons path =
    Cons {
       filename_ = path,
+      encoding_ = Nothing,
       mode_ = Nothing,
       color_ = Nothing,
       embedFont_ = [],
@@ -30,6 +34,14 @@
    }
 
 
+{- |
+Setting the encoding to anything different
+from 'Graphics.Gnuplot.Encoding.locale'
+makes only sense if you write your gnuplot files manually using this encoding.
+-}
+encoding :: Encoding.T -> T -> T
+encoding enc term = term{encoding_ = Just enc}
+
 landscape :: T -> T
 landscape = setMode Landscape
 
@@ -83,12 +95,13 @@
 instance Terminal.C T where
    canonical term =
       Terminal.Cons {
+         Terminal.precommands = Encoding.formatMaybe $ encoding_ term,
          Terminal.options =
             "postscript" :
-            (maybeToList $ fmap formatMode $ mode_ term) ++
-            (maybeToList $ fmap (\b -> if b then "color" else "monochrome") $ color_ term) ++
+            (listFromMaybeWith formatMode $ mode_ term) ++
+            (listFromMaybeWith (\b -> if b then "color" else "monochrome") $ color_ term) ++
             (concatMap (\path -> "fontfile" : quote path : []) $ embedFont_ term) ++
-            (maybe [] (\(name,size) -> "font" : quote name : show size : []) $ font_ term) ++
+            (foldMap (\(name,size) -> "font" : quote name : show size : []) $ font_ term) ++
             [],
          Terminal.commands =
             ["set output " ++ (quote $ filename_ term)],
diff --git a/src/Graphics/Gnuplot/Terminal/SVG.hs b/src/Graphics/Gnuplot/Terminal/SVG.hs
--- a/src/Graphics/Gnuplot/Terminal/SVG.hs
+++ b/src/Graphics/Gnuplot/Terminal/SVG.hs
@@ -1,22 +1,33 @@
 module Graphics.Gnuplot.Terminal.SVG (
    T, cons,
+   encoding,
    ) where
 
 import qualified Graphics.Gnuplot.Private.Terminal as Terminal
+import qualified Graphics.Gnuplot.Private.Encoding as Encoding
 import Graphics.Gnuplot.Utility (quote, )
 
 
 data T =
    Cons {
-      filename_ :: FilePath
+      filename_ :: FilePath,
+      encoding_ :: Maybe Encoding.T
    }
 
 cons :: FilePath -> T
 cons path =
    Cons {
-      filename_ = path
+      filename_ = path,
+      encoding_ = Nothing
    }
 
+{- |
+Setting the encoding to anything different
+from 'Graphics.Gnuplot.Encoding.locale'
+makes only sense if you write your gnuplot files manually using this encoding.
+-}
+encoding :: Encoding.T -> T -> T
+encoding enc term = term{encoding_ = Just enc}
 
 
 -- private functions
@@ -24,6 +35,7 @@
 instance Terminal.C T where
    canonical term =
       Terminal.Cons {
+         Terminal.precommands = Encoding.formatMaybe $ encoding_ term,
          Terminal.options =
             "svg" :
             [],
diff --git a/src/Graphics/Gnuplot/Terminal/WXT.hs b/src/Graphics/Gnuplot/Terminal/WXT.hs
--- a/src/Graphics/Gnuplot/Terminal/WXT.hs
+++ b/src/Graphics/Gnuplot/Terminal/WXT.hs
@@ -41,6 +41,7 @@
 instance Terminal.C T where
    canonical term =
       Terminal.Cons {
+         Terminal.precommands = [],
          Terminal.options =
             "wxt" :
             catMaybes (
diff --git a/src/Graphics/Gnuplot/Terminal/X11.hs b/src/Graphics/Gnuplot/Terminal/X11.hs
--- a/src/Graphics/Gnuplot/Terminal/X11.hs
+++ b/src/Graphics/Gnuplot/Terminal/X11.hs
@@ -37,6 +37,7 @@
 instance Terminal.C T where
    canonical term =
       Terminal.Cons {
+         Terminal.precommands = [],
          Terminal.options =
             "x11" :
             catMaybes (
diff --git a/src/Graphics/Gnuplot/Utility.hs b/src/Graphics/Gnuplot/Utility.hs
--- a/src/Graphics/Gnuplot/Utility.hs
+++ b/src/Graphics/Gnuplot/Utility.hs
@@ -1,5 +1,8 @@
 module Graphics.Gnuplot.Utility where
 
+import Text.Printf (printf, )
+
+import qualified Data.Char as Char
 import Data.List (intersperse, )
 
 
@@ -22,9 +25,27 @@
 semiColonConcat = concat . intersperse "; "
 
 
-quote :: String -> String
-quote = show
+{-
+In former versions this was simply 'show'.
+However, Haskell formats non-ASCII characters with decimal backslash sequences
+whereas gnuplot expects octal ones.
+gnuplot does also not accept bigger octal numbers.
+The current version writes non-ASCII printable characters
+with the system default encoding.
+-}
+quote, _quote :: String -> String
+quote str = '"' : foldr (++) "\"" (map escapeChar str)
+_quote str = '"' : concatMap escapeChar str ++ "\""
 
+escapeChar :: Char -> String
+escapeChar c =
+   case c of
+      '"'  -> "\\\""
+      '\\' -> "\\\\"
+      '\t' -> "\\t"
+      '\n' -> "\\n"
+      _ -> if Char.isPrint c then [c] else printf "\\%o" $ Char.ord c
+
 assembleCells :: [[ShowS]] -> String
 assembleCells ps =
    foldr ($) ""
@@ -34,6 +55,9 @@
             [showString "\n"])
          ps)
 
+
+listFromMaybeWith :: (a -> b) -> Maybe a -> [b]
+listFromMaybeWith f = maybe [] ((:[]) . f)
 
 formatBool :: String -> Bool -> String
 formatBool name b =
