Skip to content

Commit 14f55c5

Browse files
authored
Merge pull request #215 from jneira/vfs-force-utf8
Force utf8 encoding when writing vfs temp files
2 parents 65607bf + da4aefa commit 14f55c5

File tree

1 file changed

+1
-0
lines changed
  • src/Language/Haskell/LSP

1 file changed

+1
-0
lines changed

src/Language/Haskell/LSP/VFS.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ persistFileVFS vfs uri =
192192
writeRaw h = do
193193
-- We honour original file line endings
194194
hSetNewlineMode h noNewlineTranslation
195+
hSetEncoding h utf8
195196
hPutStr h contents
196197
logs $ "haskell-lsp:persistFileVFS: Writing virtual file: "
197198
++ "uri = " ++ show uri ++ ", virtual file = " ++ show tfn

0 commit comments

Comments
 (0)