std/encodings: Fix open() documentation in regard to exception raised (#21187)
This commit is contained in:
parent
5684093135
commit
9e35631191
1 changed files with 1 additions and 1 deletions
|
|
@ -339,7 +339,7 @@ proc getCurrentEncoding*(uiApp = false): string =
|
||||||
|
|
||||||
proc open*(destEncoding = "UTF-8", srcEncoding = "CP1252"): EncodingConverter =
|
proc open*(destEncoding = "UTF-8", srcEncoding = "CP1252"): EncodingConverter =
|
||||||
## Opens a converter that can convert from `srcEncoding` to `destEncoding`.
|
## 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):
|
when not defined(windows):
|
||||||
result = iconvOpen(destEncoding, srcEncoding)
|
result = iconvOpen(destEncoding, srcEncoding)
|
||||||
if result == nil:
|
if result == nil:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue