Skip to content

Commit 30225b8

Browse files
authored
Enhance example in README.md (#9)
1 parent 49efbd4 commit 30225b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Now you can detect the encoding via the `CompactEncDet.detect_encoding`,
3131
which is a thin wrapper around `CompactEncDet::DetectEncoding` and `MimeEncodingName` functions from the C++ library.
3232
3333
> ```ruby
34-
> file = File.read("unknown-encoding.txt")
34+
> file = File.read("unknown-encoding.txt", mode: "rb")
3535
> result = CompactEncDet.detect_encoding(file)
3636
> result.encoding
3737
> # => #<Encoding:Windows-1250>

0 commit comments

Comments
 (0)