Commit Graph

6 Commits

Author SHA1 Message Date
MoZhonghua
0efdb40d57 Fix truncated data 2016-06-24 10:54:53 +08:00
MoZhonghua
9ec1b936e5 fillBuffer() should not return -1 when EOF 2016-06-23 10:56:59 +08:00
MoZhonghua
331deca0a8 Fix #17: NewReader can't process data bigger than 8K
This shoud also fix issue #25: When the amount of data will be truncated

iconv() will return EINVAL when An incomplete multibyte sequence is
encountered in the input, and the input byte sequence terminates after
it. So if the input is larger than the internal buffer of Reader and
the end of the buffer conatins partial multi-byte chars, then Reader
will failed with EINVAL.

So when iconv() return EINVAL, we checks whether there are more data to
process, if so, we continue without report an error to user.
2016-06-18 17:02:05 +08:00
Donovan Jimenez
d8ca80955a go1 updates: standard errors now in syscall package, no more makefile support 2012-04-10 18:30:42 -04:00
Donovan Jimenez
690531c87e * Added README.md
* moved sample programs to examples directory
 * cleaned up make make file
 * converter.go: ConvertString now uses Convert under the hood, removes some code duplication
 * reader.go: No need to have two separate buffers, can write directly in to buffer given in Read call. Simplifies code greatly
2011-01-15 04:06:50 -05:00
Donovan Jimenez
82db0fae9a Initial iconv go package, supports:
* string conversion
 * byte slice conversion
 * Reader conversion
2011-01-14 18:34:30 -05:00