Ah okay! I understand better now. Thanks Sven! Alexandre
> On Jun 29, 2016, at 12:33 PM, Sven Van Caekenberghe <s...@stfx.eu> wrote: > > >> On 29 Jun 2016, at 16:00, Alexandre Bergel <alexandre.ber...@me.com> wrote: >> >> Thanks Sebastian! >> >> Apparently, it is related to UTF encoding. > > To be more correct: the resource (file) is served (by github) with a > content-type of 'application/octet-stream', which means it should be > interpreted as pure bytes. Maybe that is on purpose (the 'raw' aspect). Still > it means a client cannot know what is inside, it could guess. It should be > served as 'text/csv' so that clients at least know what it is and can act > accordingly (like apply the proper text converter). > >> The following code works well >> >> c := (ZnEasy get: >> 'https://github.com/sudar/pig-samples/raw/master/data/tweets.csv') contents. >> c := ZnCharacterEncoder utf8 decodeBytes: c. >> content := c readStream. >> lines := (NeoCSVReader on: content) >> skipHeader; >> upToEnd. >> >> Strange >> Alexandre >> >> >> >>> On Jun 28, 2016, at 5:54 PM, Sebastian Heidbrink via Pharo-users >>> <pharo-users@lists.pharo.org> wrote: >>> >>> >>> From: Sebastian Heidbrink <shei...@yahoo.de> >>> Subject: Re: [Pharo-users] Issue with NeoCSVReader >>> Date: June 28, 2016 at 5:53:44 PM GMT-4 >>> To: Any question about pharo is welcome <pharo-users@lists.pharo.org> >>> >>> >>> Hi Alexandre, >>> >>> I do not have access to a pharo image right now. But I had a look into your >>> csv file. >>> There are rows that do not include any or to few data. I think NeoCSVReader >>> can not handle that and expects a "proper" file >>> >>> I will check tonight, in case nobody else comes up with additional >>> information by then. >>> >>> To be continued >>> Sebastian >>> >>> >>> >>> Am 28.06.2016 um 14:41 schrieb Alexandre Bergel: >>>> Hi! >>>> >>>> I have a simple use of NeoCSVReader, but I get a rollback. >>>> >>>> -=-=-=-=-=-=-=-=-= >>>> content := (ZnEasy get: >>>> 'https://github.com/sudar/pig-samples/raw/master/data/tweets.csv') >>>> contents readStream. >>>> lines := (NeoCSVReader on: content) >>>> skipHeader; >>>> upToEnd. >>>> -=-=-=-=-=-=-=-=-= >>>> >>>> The url points to a .csv file with a header. No idea why the code . >>>> >>>> I loaded the csv reader using: >>>> Gofer new >>>> smalltalkhubUser: 'SvenVanCaekenberghe' project: 'Neo'; >>>> package: 'ConfigurationOfNeoCSV'; load. >>>> (Smalltalk at: #ConfigurationOfNeoCSV) loadBleedingEdge. >>>> >>>> Alexandre >>> >>> >>> >>> >>> >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.