Skip to content

Commit c1ce40e

Browse files
Add a note about UTF-8 encoding
1 parent 4b1ddc3 commit c1ce40e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Streamly/Internal/System/Process.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,8 @@ processBytes = pipeBytes
805805
-- For control over the input buffer use your own chunking and chunk based
806806
-- APIs.
807807
--
808+
-- NOTE: This API uses UTF-8 encoding.
809+
--
808810
-- >>> :{
809811
-- Process.toChars "echo" ["hello world"]
810812
-- & Process.pipeChars "tr" ["[a-z]", "[A-Z]"]
@@ -982,6 +984,8 @@ toChunks = toChunksWith id
982984
-- | @toChars path args@ runs the executable specified by @path@ using @args@
983985
-- as arguments and returns the output of the process as a stream of chars.
984986
--
987+
-- NOTE: This API uses UTF-8 encoding.
988+
--
985989
-- Raises 'ProcessFailure' exception in case of failure.
986990
--
987991
-- Definition:
@@ -1000,6 +1004,8 @@ toChars path args = toBytes path args & Unicode.decodeUtf8
10001004
-- as arguments and folds the output of the process at line breaks, using the
10011005
-- fold @f@, to return a stream of folded lines.
10021006
--
1007+
-- NOTE: This API uses UTF-8 encoding.
1008+
--
10031009
-- Raises 'ProcessFailure' exception in case of failure.
10041010
--
10051011
-- To return a stream of lines as strings:
@@ -1022,6 +1028,8 @@ toLines f path args = toChars path args & Unicode.lines f
10221028
-- | @toString path args@ runs the executable specified by @path@ using @args@
10231029
-- as arguments and folds the entire output of the process as a single string.
10241030
--
1031+
-- NOTE: This API uses UTF-8 encoding.
1032+
--
10251033
-- Definition:
10261034
--
10271035
-- >>> toString path args = toChars path args & Stream.toList

0 commit comments

Comments
 (0)