Comments (2)
An ASCII delimiter in the undecoded ByteString corresponds a delimiter in the corresponding UTF-8-decoded Text, so under UTF-8 encoding there is no problem with making a mistake with delimiters.
However, the user is forced to use UTF-8 if there are Text/ShortText/Char fields (cassava assumes UTF-8). If he wants to use another text encoding, he needs to use ByteString fields and do the ByteString-Text conversion separately. Alternatively, he can perform transcoding between UTF-8 and the other text encoding, using UTF-8-encoded ByteStrings when interfacing with cassava.
I have no idea about the performance characteristics of each alternative, though, including the proposed Data.Csv.Utf8
.
from cassava.
To be clear Data.Csv.Utf8
would just be the current implementation. The module name should make it clear that using utf8 for the ByteString
arguments is safe, and that non-utf8 arguments should expect edge cases and require additional care.
I am also unsure of how the Data.Csv
or Data.Csv.Text
or whatever Text
-based alternative would change performance.
from cassava.
Related Issues (20)
- cast: Dynamic type cast failed. Expected: String. Actual: Nil HOT 1
- Reading NaNs HOT 1
- Please bump `base` to allow `4.14` HOT 1
- cassava doesn't compile with ghc 9.0.1rc1 even with --allow-new HOT 3
- Loosen bounds on latest base HOT 2
- better control of generic field name parsing
- Doesn't work with bytestring-0.10.12.0 HOT 1
- Not clear what is meant by unpacking HOT 1
- base version mismatch in 0.5.2.0 HOT 2
- Can ToField have Vectors/Functors instances?
- Deriving FromField/ToField instances? HOT 6
- Example code missing salaries.csv file
- Per-line parser reporting per-line errors HOT 3
- parseField does not range-check for Word16
- Allow building with `vector-0.13.*` HOT 1
- encodeRecord variant that does not append recordSep
- Call for maintainer(s) HOT 2
- FromNamedRecord and number of rows with values less than rows in file
- GHC 9.10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cassava.