janx2 / ccsvparse Goto Github PK
View Code? Open in Web Editor NEWSmall Cocoa CSV file parser (see link for the official repository on github).
Home Page: https://github.com/JanX2/cCSVParse
License: Other
Small Cocoa CSV file parser (see link for the official repository on github).
Home Page: https://github.com/JanX2/cCSVParse
License: Other
I'm trying to parse a CSV file that contains some UTF-8 characters. Here are a few example strings;
http://commons.wikimedia.org/wiki/File:Şahlûr-33.jpg
Dûrzan cîrano / CC BY-SA 3.0
Christian Mehlführer / CC-BY 2.5
In the case of the last string, it is parsed into the array as:
Christian Mehlf\U00c3\U00bchrer / CC-BY 2.5
The UTF-8 hex of ü is C3 BC
, present in the string. How do you convert from the imported string to an NSString? I've having trouble with this - it looks like the unicode escaping is incorrect?
I ran into an issue where cCSVParse wasn't importing my entire CSV file. I adjusted the _bufferSize in the init method and was able to continue. What exactly is it buffering? Characters? Is there a reason why it was set at 2049? I raised it to 5500 -- what are the potential implications of this?
If you have a minute, you might want to comment that value.
FYI, here's the project I'm working on:
https://github.com/GameAid/Toddler-Taxonomist
And here's the CSV file:
https://github.com/GameAid/Toddler-Taxonomist/blob/master/Toddler%20Taxonomist/animal_list.csv
Thanks for maintaining this library! It has saved me a lot of time.
Prorper Data
This is what expected
<__NSArrayM 0x60000084a380>(
11/14/2018 11:57:01.047 AM,
455 mmHg,
445 mmHg,
454 BPM,
70.0 kgs,
10 mmHg,
448.3 mmHg,
Tags: Before Medication
Measurement Location: Seated
Measurement Site: Left Leg
Notes: Sgr
,
Before Medication
)
Improper Data
But sometimes getting this
(lldb) po [csvArray objectAtIndex:i]
<__NSArrayM 0x600000650ad0>(
11/14/2018 10:41:15.380 ��,
181 mmHg,
181 mmHg,
181 BPM,
70.0 кг,
0 mmHg,
181.0 mmHg,
�е�ки: After Blood Pressure Medication
�оза изме�ени�: �ежа
�е��о изме�ени�: �ева� нога
��име�ани�: Regh
,
After Blood Pressure Medication
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.