std/encodings: Fix open() documentation in regard to exception raised (#21187)

This commit is contained in:
Phil Krylov
2022-12-28 03:26:52 +01:00
committed by GitHub
parent 5684093135
commit 9e35631191

View File

@@ -339,7 +339,7 @@ proc getCurrentEncoding*(uiApp = false): string =
proc open*(destEncoding = "UTF-8", srcEncoding = "CP1252"): EncodingConverter =
## Opens a converter that can convert from `srcEncoding` to `destEncoding`.
## Raises `IOError` if it cannot fulfill the request.
## Raises `EncodingError` if it cannot fulfill the request.
when not defined(windows):
result = iconvOpen(destEncoding, srcEncoding)
if result == nil: