diff --git a/alex.cabal b/alex.cabal
--- a/alex.cabal
+++ b/alex.cabal
@@ -1,5 +1,5 @@
 name: alex
-version: 3.1.1
+version: 3.1.2
 license: BSD3
 license-file: LICENSE
 copyright: (c) Chis Dornan, Simon Marlow
@@ -16,6 +16,10 @@
   for scanning text efficiently. It is similar to the tool
   lex or flex for C/C++.
   .
+  Changes in 3.1.2:
+  .
+  * Add missing file to extra-source-files
+  .
   Changes in 3.1.1:
   .
   * Bug fixes (#24, #30, #31, #32)
@@ -71,6 +75,7 @@
         tests/tokens_strict_bytestring.x
         tests/tokens_monad_bytestring.x
         tests/tokens_monadUserState_bytestring.x
+        tests/tokens_bytestring_unicode.x
         tests/unicode.x
 
 source-repository head
diff --git a/dist/build/alex/alex-tmp/Parser.hs b/dist/build/alex/alex-tmp/Parser.hs
--- a/dist/build/alex/alex-tmp/Parser.hs
+++ b/dist/build/alex/alex-tmp/Parser.hs
@@ -21,7 +21,7 @@
 import qualified Data.Array as Happy_Data_Array
 import qualified GHC.Exts as Happy_GHC_Exts
 
--- parser produced by Happy Version 1.19.0.1
+-- parser produced by Happy Version 1.19.1
 
 newtype HappyAbsSyn  = HappyAbsSyn HappyAny
 #if __GLASGOW_HASKELL__ >= 607
diff --git a/tests/tokens_bytestring_unicode.x b/tests/tokens_bytestring_unicode.x
new file mode 100644
--- /dev/null
+++ b/tests/tokens_bytestring_unicode.x
@@ -0,0 +1,42 @@
+{
+{-# LANGUAGE OverloadedStrings #-}
+module Main (main) where
+import System.Exit
+import Data.ByteString.Lazy.Char8 (unpack)
+}
+
+%wrapper "basic-bytestring"
+
+$digit = 0-9      -- digits
+$alpha = [a-zA-Zαβ]    -- alphabetic characters
+
+tokens :-
+
+  $white+        ;
+  "--".*        ;
+  let          { \s -> Let }
+  in          { \s -> In }
+  $digit+                               { \s -> Int (read (unpack s)) }
+  [\=\+\-\*\/\(\)]                      { \s -> Sym (head (unpack s)) }
+  $alpha [$alpha $digit \_ \']*         { \s -> Var (unpack s) }
+
+{
+-- Each right-hand side has type :: ByteString -> Token
+
+-- The token type:
+data Token =
+  Let     |
+  In      |
+  Sym Char  |
+  Var String  |
+  Int Int    |
+  Err
+  deriving (Eq,Show)
+
+main = if test1 /= result1 then exitFailure
+                           else exitWith ExitSuccess
+
+-- \206\177\206\178\206\178 is "αββ" utf-8 encoded
+test1 = alexScanTokens "  let in 012334\n=+*foo \206\177\206\178\206\178 bar__'"
+result1 = [Let,In,Int 12334,Sym '=',Sym '+',Sym '*',Var "foo",Var "\206\177\206\178\206\178",Var "bar__'"]
+}
