Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add documentation note about encodings.

  • Loading branch information...
commit c7e228d51a829471c570547568c8a410a0779f10 1 parent 4a168fc
Aleksandar Dimitrov adimit authored

Showing 1 changed file with 18 additions and 0 deletions. Show diff stats Hide diff stats

  1. +18 0 Text/Search/Sphinx/Configuration.hs
18 Text/Search/Sphinx/Configuration.hs
@@ -3,6 +3,24 @@ module Text.Search.Sphinx.Configuration where
3 3 import qualified Text.Search.Sphinx.Types as T
4 4
5 5 -- | The configuration for a query
  6 +--
  7 +-- A note about encodings: The encoding specified here is also the one used to
  8 +-- decode wthe server's repsonses. Specifically,
  9 +--
  10 +-- * @'T.words' 'T.QueryResult' :: Text@
  11 +--
  12 +-- * @'T.AttrString' :: Text -> 'T.Attr'@
  13 +--
  14 +-- rely on it.
  15 +--
  16 +-- If the specified encoding doesn't support characters sent to the server,
  17 +-- they will silently be substituted with the byte value of @\'\\SUB\'@ before transmission.
  18 +--
  19 +-- If the server sends a byte value back that the encoding doesn't understand,
  20 +-- the bytes are going to be converted into special values as specified by that
  21 +-- encoding. When decoding invalid UTF-8, for example, all invalid bytes are
  22 +-- going to be substituted with @\'\\65533\' :: 'Char'@.
  23 +--
6 24 data Configuration = Configuration {
7 25 -- | The hostname of the Sphinx daemon
8 26 host :: String

0 comments on commit c7e228d

Please sign in to comment.
Something went wrong with that request. Please try again.