diff --git a/hasktags.cabal b/hasktags.cabal
--- a/hasktags.cabal
+++ b/hasktags.cabal
@@ -1,5 +1,5 @@
 Name: hasktags
-Version: 0.72.0
+Version: 0.73.0
 Copyright: The University Court of the University of Glasgow
 License: BSD3
 License-File: LICENSE
@@ -16,9 +16,23 @@
 Category: Development
 build-type: Simple
 cabal-version: >=1.10
+
+tested-with:
+  GHC == 9.6.2
+  GHC == 9.4.5
+  GHC == 9.2.8
+  GHC == 9.0.2
+  GHC == 8.10.7
+  GHC == 8.8.4
+  GHC == 8.6.5
+  GHC == 8.4.4
+  GHC == 8.2.2
+  GHC == 8.0.2
+  GHC == 7.10.3
+
 extra-source-files:
-  README.md,
-  TODO,
+  README.md
+  TODO
   testcases/HUnitBase.lhs
   testcases/Repair.lhs
   testcases/blockcomment.hs
@@ -55,33 +69,49 @@
   location: http://github.com/MarcWeber/hasktags
 
 library
-  default-language:  Haskell2010
   hs-source-dirs:    src
-  ghc-options:       -Wall
+  default-language:  Haskell2010
   exposed-modules:   Hasktags
   other-modules:     Tags, DebugShow
   build-depends:
-    utf8-string,
-    base >= 4 && < 5,
-    bytestring >= 0.9 && < 0.11,
-    directory >= 1.2.6 && < 1.4,
-    filepath,
-    json >= 0.5 && < 0.11,
-    microlens-platform >= 0.3.8.0 && < 0.5
+      base               >= 4.8     && < 5
+    , bytestring         >= 0.9     && < 0.12
+    , directory          >= 1.2.6   && < 1.4
+    , filepath
+    , json               >= 0.5     && < 0.11
+    , microlens-platform >= 0.3.8.0 && < 0.5
+    , utf8-string
 
+  ghc-options:
+    -Wall
+  if impl(ghc >= 8.0)
+    ghc-options:
+      -Wcompat
+  -- 2021-11-20 Andreas Abel
+  -- GHC 9.2.1 has a new warning about pattern-lambdas and pattern-lets
+  -- that is distracting.
+  if impl(ghc == 9.2.1)
+    ghc-options:
+      -Wno-incomplete-uni-patterns
+
 Executable hasktags
-    Main-Is: src/Main.hs
-    Build-Depends:
-      base,
-      directory,
-      filepath,
-      hasktags,
-      optparse-applicative,
-      containers
-    other-modules: Paths_hasktags
-    ghc-options: -Wall
-    default-language: Haskell2010
+  Main-Is: src/Main.hs
+  default-language: Haskell2010
+  Build-Depends:
+      hasktags
+    , base
+    , containers
+    , directory
+    , filepath
+    , optparse-applicative
+  other-modules: Paths_hasktags
 
+  ghc-options:
+    -Wall
+  if impl(ghc >= 8.0)
+    ghc-options:
+      -Wcompat
+
   if flag(debug)
     cpp-options: -Ddebug
 
@@ -89,18 +119,23 @@
   Type: exitcode-stdio-1.0
   Main-Is: Test.hs
   hs-source-dirs: src, tests
+  default-language: Haskell2010
   Build-Depends:
-                utf8-string,
-                base,
-                bytestring,
-                directory,
-                filepath,
-                json,
-                HUnit,
-                microlens-platform
+      base
+    , bytestring
+    , directory
+    , filepath
+    , json
+    , microlens-platform
+    , utf8-string
+    , HUnit
   other-modules: Tags, Hasktags, DebugShow
-  ghc-options: -Wall
-  default-language: Haskell2010
+
+  ghc-options:
+    -Wall
+  if impl(ghc >= 8.0)
+    ghc-options:
+      -Wcompat
 
   if flag(debug)
     cpp-options: -Ddebug
diff --git a/src/Hasktags.hs b/src/Hasktags.hs
--- a/src/Hasktags.hs
+++ b/src/Hasktags.hs
@@ -36,7 +36,7 @@
                                               isSymbolicLink)
 #endif
 import           System.FilePath            ((</>))
-import           System.IO                  (Handle, IOMode, hClose, openFile, stdout)
+import           System.IO                  (Handle, IOMode, hClose, openFile, stdout, utf8, hSetEncoding)
 import           Tags                       (FileData (..), FileName,
                                              FoundThing (..),
                                              FoundThingType (FTClass, FTCons, FTConsAccessor, FTConsGADT, FTData, FTDataGADT, FTFuncImpl, FTFuncTypeDef, FTInstance, FTModule, FTNewtype, FTPattern, FTPatternTypeDef, FTType),
@@ -100,7 +100,10 @@
 getOutFile :: String -> IOMode -> IO Handle
 getOutFile filepath openMode
   | "-" == filepath = return stdout
-  | otherwise       = openFile filepath openMode
+  | otherwise       = do
+    h <- openFile filepath openMode
+    hSetEncoding h utf8
+    pure h
 
 data TagsFile = TagsFile
   { _ctagsFile :: FilePath
diff --git a/src/Main.hs b/src/Main.hs
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -9,7 +9,7 @@
 import Data.Set (Set, notMember, fromList, union)
 import Data.Version (showVersion)
 import Options.Applicative
-import Options.Applicative.Help.Pretty (text, line)
+import Options.Applicative.Help.Pretty (pretty, line)
 import Paths_hasktags (version)
 import System.Directory (doesFileExist)
 import System.Environment (getArgs)
@@ -161,17 +161,17 @@
              long "version"
           <> help "show version"
 
-        replaceDirsInfo = text $ unwords
+        replaceDirsInfo = pretty $ unwords
           [
             "directories will be replaced by DIR/**/*.hs DIR/**/*.lhs"
           , "Thus hasktags . tags all important files in the current directory."
           ]
-        symlinksInfo = text $ unwords
+        symlinksInfo = pretty $ unwords
           [
             "If directories are symlinks they will not be followed"
           , "unless you pass -L."
           ]
-        stdinInfo = text $ unwords
+        stdinInfo = pretty $ unwords
           [
             "A special file \"STDIN\" will make hasktags read the line separated file "
           , "list to be tagged from STDIN."
