diff --git a/hxt.cabal b/hxt.cabal
--- a/hxt.cabal
+++ b/hxt.cabal
@@ -1,6 +1,6 @@
 -- arch-tag: Haskell XML Toolbox main description file
 Name:           hxt
-Version:        9.3.1.0
+Version:        9.3.1.1
 Synopsis:       A collection of tools for processing XML with Haskell.
 Description:    The Haskell XML Toolbox bases on the ideas of HaXml and HXML,
                 but introduces a more general approach for processing XML with Haskell.
@@ -16,6 +16,8 @@
                 hxt-unicode contains encoding and decoding functions,
                 hxt-charproperties char properties for unicode and XML.
                 .
+                Changes from 9.3.1.0: in readString all input decoding switched off
+                .
                 Changes from 9.3.0.1: lower bound for network set to be >= 2.4
                 .
                 Changes from 9.3.0: upper bound for network set to be < 2.4 (URI signatures changed in 2.4)
@@ -34,7 +36,7 @@
 Homepage:       http://www.fh-wedel.de/~si/HXmlToolbox/index.html
 Copyright:      Copyright (c) 2005-2012 Uwe Schmidt
 Build-type:     Simple
-Cabal-version:  >=1.6
+Cabal-version:  >=1.8
 
 extra-source-files:
  examples/arrows/absurls/AbsURIs.hs
@@ -189,3 +191,7 @@
                 hxt-charproperties  >= 9.1    && < 10,
                 hxt-unicode         >= 9.0.1  && < 10,
                 hxt-regex-xmlschema >= 9      && < 10
+
+Source-Repository head
+  Type:     git
+  Location: git://github.com/UweSchmidt/hxt.git
diff --git a/src/Text/XML/HXT/Arrow/DocumentInput.hs b/src/Text/XML/HXT/Arrow/DocumentInput.hs
--- a/src/Text/XML/HXT/Arrow/DocumentInput.hs
+++ b/src/Text/XML/HXT/Arrow/DocumentInput.hs
@@ -15,8 +15,7 @@
 -- ------------------------------------------------------------
 
 module Text.XML.HXT.Arrow.DocumentInput
-    ( getURIContents
-    , getXmlContents
+    ( getXmlContents
     , getXmlEntityContents
     , getEncoding
     , getTextEncoding
@@ -171,35 +170,31 @@
 getHttpContents
     = withoutUserState $ applyA $ getSysVar theHttpHandler
 
-getURIContents          :: IOStateArrow s XmlTree XmlTree
-getURIContents
-    = getContentsFromString
-      `orElse`
-      getContentsFromDoc
-    where
-    getContentsFromString
-        = ( getAttrValue a_source
-            >>>
-            isA (isPrefixOf stringProtocol)
-          )
-          `guards`
-          getStringContents
+getContentsFromString   :: IOStateArrow s XmlTree XmlTree
+getContentsFromString
+    = ( getAttrValue a_source
+        >>>
+        isA (isPrefixOf stringProtocol)
+      )
+      `guards`
+      getStringContents
 
-    getContentsFromDoc
-        = ( ( addTransferURI $< getBaseURI
-              >>>
-              getCont
-            )
-            `when`
-            ( setAbsURI $< ( getAttrValue a_source
-                             >>^
-                             ( \ src-> (if null src then "stdin:" else src) )   -- empty document name -> read from stdin
-                           )
-            )
-          )
+getContentsFromDoc      :: IOStateArrow s XmlTree XmlTree
+getContentsFromDoc
+    = ( ( addTransferURI $< getBaseURI
           >>>
-          setDocumentStatusFromSystemState "getURIContents"
-
+          getCont
+        )
+        `when`
+        ( setAbsURI $< ( getAttrValue a_source
+                         >>^
+                         ( \ src-> (if null src then "stdin:" else src) )   -- empty document name -> read from stdin
+                       )
+        )
+      )
+      >>>
+      setDocumentStatusFromSystemState "getContentsFromDoc"
+    where
     setAbsURI src
         = ifA ( constA src >>> changeBaseURI )
           this
@@ -211,7 +206,7 @@
     getCont
         = applyA ( getBaseURI                           -- compute the handler and call it
                    >>>
-                   traceValue 2 (("getURIContents: reading " ++) . show)
+                   traceValue 2 (("getContentsFromDoc: reading " ++) . show)
                    >>>
                    getSchemeFromURI
                    >>>
@@ -280,25 +275,28 @@
 
 getXmlContents'         :: IOStateArrow s XmlTree XmlTree -> IOStateArrow s XmlTree XmlTree
 getXmlContents' parseEncodingSpec
-    = ( getURIContents
-        >>>
-        choiceA
-        [ isXmlHtmlDoc  :-> ( parseEncodingSpec
-                              >>>
-                              filterErrorMsg
-                              >>>
-                              decodeDocument
-                            )
-        , isTextDoc     :->  decodeDocument
-        , this          :-> this
-        ]
-        >>>
-        perform ( getAttrValue transferURI
-                  >>>
-                  traceValue 1 (("getXmlContents: content read and decoded for " ++) . show)
-                )
-        >>>
-        traceDoc "getXmlContents'"
+    = ( getContentsFromString    -- no decoding done for string: protocol
+        `orElse`
+        ( getContentsFromDoc
+          >>>
+          choiceA
+          [ isXmlHtmlDoc  :-> ( parseEncodingSpec
+                                >>>
+                                filterErrorMsg
+                                >>>
+                                decodeDocument
+                              )
+          , isTextDoc     :-> decodeDocument
+          , this          :-> this
+          ]
+          >>>
+          perform ( getAttrValue transferURI
+                    >>>
+                    traceValue 1 (("getXmlContents: content read and decoded for " ++) . show)
+                  )
+          >>>
+          traceDoc "getXmlContents'"
+        )
       )
       `when`
       isRoot
diff --git a/src/Text/XML/HXT/Arrow/ReadDocument.hs b/src/Text/XML/HXT/Arrow/ReadDocument.hs
--- a/src/Text/XML/HXT/Arrow/ReadDocument.hs
+++ b/src/Text/XML/HXT/Arrow/ReadDocument.hs
@@ -58,7 +58,7 @@
 this filter can be configured by a list of configuration options,
 a value of type 'Text.XML.HXT.XmlState.TypeDefs.SysConfig'
 
-for all available options see module 'Text.XML.HXT.XmlState.SystemConfig'
+for all available options see module 'Text.XML.HXT.Arrow.XmlState.SystemConfig'
 
 - @withValidate yes\/no@ :
   switch on\/off DTD validation. Only for XML parsed documents, not for HTML parsing.
@@ -88,27 +88,27 @@
 - @withCheckNamespaces yes\/no@ :
   Switch on\/off namespace propagation and checking
 
-- @withInputEncoding <encoding-spec>@ :
+- @withInputEncoding \<encoding-spec\>@ :
   Set default encoding.
 
 - @withTagSoup@ :
   use light weight and lazy parser based on tagsoup lib.
   This is only available when package hxt-tagsoup is installed and
-  'Text.XML.HXT.TagSoup' is imported
+  the source contains an @import Text.XML.HXT.TagSoup@.
 
-- @withRelaxNG <schema.rng>@ :
+- @withRelaxNG \<schema.rng\>@ :
   validate document with Relax NG, the parameter is for the schema URI.
   This implies using XML parser, no validation against DTD, and canonicalisation.
 
-- @withCurl [<curl-option>...]@ :
+- @withCurl [\<curl-option\>...]@ :
   Use the libCurl binding for HTTP access.
   This is only available when package hxt-curl is installed and
-  'Text.XML.HXT.Curl' is imported
+  the source contains an @import Text.XML.HXT.Curl@.
                    
-- @withHTTP [<http-option>...]@ :
+- @withHTTP [\<http-option\>...]@ :
   Use the Haskell HTTP package for HTTP access.
   This is only available when package hxt-http is installed and
-  'Text.XML.HXT.HTTP' is imported
+  the source contains an @import Text.XML.HXT.HTTP@.
 
 examples:
 
@@ -445,15 +445,16 @@
 -- read a document that is stored in a normal Haskell String
 --
 -- the same function as readDocument, but the parameter forms the input.
--- All options available for 'readDocument' are applicable for readString.
+-- All options available for 'readDocument' are applicable for readString,
+-- except input encoding options.
 --
--- Default encoding: No encoding is done, the String argument is taken as Unicode string
+-- Encoding: No decoding is done, the String argument is taken as Unicode string
+-- All decoding must be done before calling readString, even if the
+-- XML document contains an encoding spec.
 
 readString :: SysConfigList -> String -> IOStateArrow s b XmlTree
 readString config content
-    = readDocument
-      (withInputEncoding unicodeString : config)
-      (stringProtocol ++ content)
+    = readDocument config (stringProtocol ++ content)
 
 -- ------------------------------------------------------------
 
diff --git a/src/Text/XML/HXT/DOM/QualifiedName.hs b/src/Text/XML/HXT/DOM/QualifiedName.hs
--- a/src/Text/XML/HXT/DOM/QualifiedName.hs
+++ b/src/Text/XML/HXT/DOM/QualifiedName.hs
@@ -182,7 +182,11 @@
                                   px1 == px2
 
 instance Ord QName where
-  compare x y = compare (qualifiedName x) (qualifiedName y)
+  compare (QN lp1 px1 ns1) (QN lp2 px2 ns2)
+      | isNullXName ns1 && isNullXName ns2              -- no namespaces set: px is significant
+          = compare (px1, lp1) (px2, lp2)
+      | otherwise                                       -- namespace aware cmp: ns is significant, px is irrelevant
+          = compare (lp1, ns1) (lp2, ns2)
 
 instance NFData  QName
 instance WNFData QName
