Commit Graph

19 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
8960e66bd3 Merge pull request #24 from kowalczykp/master
Fix Panic in Go 1.6
2016-03-05 17:51:43 -05:00
pkowalczyk
072063d01b Fixes #23 using call_iconv wrapper 2016-03-05 19:56:42 +01:00
Donovan Jimenez
5f6a5a4f00 Updated README.md with note about cgo requirement 2013-12-19 12:13:16 -05:00
Donovan Jimenez
454e39a98f Issue #8: change iconv import to reflect typical github import path 2013-08-19 12:33:08 -04:00
Donovan Jimenez
c6169bab90 running gofmt on sources, and removing iconv LDFLAG on linux 2013-06-27 16:56:58 -04:00
Donovan Jimenez
76220410e9 issue #6: adding LICENSE file with 2-clause BSD text 2013-06-27 16:47:50 -04:00
Donovan Jimenez
434bc339c7 Merge pull request #2 from haonan3344/patch-1
In windows cannot "go get ...",for  "undefined reference to libiconv"
2012-06-23 01:14:23 -07:00
haonan3344
9972d7fa01 In windows cannot "go get ...",for "undefined reference to libiconv"
please  patch it so as to support more os
2012-06-23 09:33:59 +08:00
Donovan Jimenez
9f790a3b51 Issue #1 - Corrected README installation instructions 2012-05-31 10:08:28 -03:00
Donovan Jimenez
4266152eb8 Update readme for project name change, go get doesn't like .go at the end of the github project name 2012-04-10 18:59:18 -04: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
8c9fe240c5 Adding basic iconv unit tests and an untested (yet) writer implementation 2011-01-29 01:32:55 -05:00
Donovan Jimenez
5ea739d3eb Improving documentation and including shift reset logic 2011-01-29 01:31:00 -05:00
Donovan Jimenez
20aa6d93c3 Make sure we free our data made by C.CString. Also, updated cgo comments to multiline - seems to be preferred style 2011-01-16 14:40:30 -05: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