Skip to content

Commit d7bafbb

Browse files
authored
Merge pull request #248 from Mistuke/wip/change-pipes-to-use-default-encoding
winio: match mio in setting default encoding for pipes instead
2 parents af0614c + 1148660 commit d7bafbb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

System/Process/Common.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ mbPipeHANDLE CreatePipe pfd mode =
292292
do raw_handle <- peek pfd
293293
let hwnd = fromHANDLE raw_handle :: Io NativeHandle
294294
ident = "hwnd:" ++ show raw_handle
295-
Just <$> mkHandleFromHANDLE hwnd Stream ident mode Nothing
295+
enc <- fmap Just getLocaleEncoding
296+
Just <$> mkHandleFromHANDLE hwnd Stream ident mode enc
296297
mbPipeHANDLE _std _pfd _mode = return Nothing
297298
#endif

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Correct permissions on createPipe on Windows [234](https://github.com/haskell/process/pull/234)
66
* Ensure that both ends of pipes on Windows are created in the same mode [234](https://github.com/haskell/process/pull/234)
77
* Fixed an issue with WINIO where giving an application an inherited pipe can cause it to misbehave [245](https://github.com/haskell/process/pull/245)
8+
* Set the encoding on WINIO created pipes to the local encoding as with MIO [248](https://github.com/haskell/process/pull/248)
89

910
## 1.6.14.0 *February 2022*
1011

0 commit comments

Comments
 (0)