Close converter
This commit is contained in:
parent
8960e66bd3
commit
f5db214e8b
@ -18,7 +18,9 @@ func NewReader(source io.Reader, fromEncoding string, toEncoding string) (*Reade
|
||||
converter, err := NewConverter(fromEncoding, toEncoding)
|
||||
|
||||
if err == nil {
|
||||
return NewReaderFromConverter(source, converter), err
|
||||
reader := iconv.NewReaderFromConverter(source, converter)
|
||||
converter.Close()
|
||||
return reader, err
|
||||
}
|
||||
|
||||
// return the error
|
||||
|
Loading…
Reference in New Issue
Block a user