Comments (2)
I'm considering how (and if) I'll fix this issue. The code the does line end detection is a bit tricky because of some optimizations. I don't want support for /r
line ends to introduce a performance penalty for the more common cases. I expect that support for this would require explicitly stating that the file uses Mac line terminators, rather than automatically detecting them. In the meantime, you can work-around this by using the class in this gist: https://gist.github.com/MarkPflug/d524ddd50db171b302dcacb204ff86e2
You can use this class to "fix" the input to conform to the expected line ends:
TextReader reader = File.OpenText("macos.csv");
// wrap the text reader in an adapter that will swap out `/n` for `/r`
reader = new MacOSTextReader(reader);
var csvReader = CsvDataReader.Create(reader);
Oh, and I should mention... I haven't tested this, at all.
from sylvan.
I convinced myself that this should be supported. I just pushed 1.3.1 to nuget which allows '\r' newlines without any special configuration.
from sylvan.
Related Issues (20)
- GetDate (.net 6) doesn't respect DateFormat options HOT 4
- GetRecords throw an exception when using a record type HOT 4
- Truncated output of CsvDataWriter HOT 9
- Doesn't distinguish between empty string and null HOT 3
- CsvReader (using CSV Data Binder) does not appear to respect DateOnlyFormat or Culture options HOT 3
- Question: how do we tell the databinder what format a datetime field is in? HOT 5
- Quoting Strings in Sylvan.Data.Csv HOT 1
- Debug symbols/source for NuGet package? HOT 12
- CsvDataReader missing GetRecords<T>() HOT 7
- Using CsvDataReader in PowerShell HOT 2
- CsvReader Unable to Import Scientific Notation Value to SQL Decimal HOT 3
- Exception messages could be made more helpful? HOT 3
- Suggestion: Enable support for [NotMapped] attribute to tell the binder a class property has no mapping to the datasource HOT 2
- Doc error HOT 2
- Ordering of columns HOT 3
- Nullable string from an empty string HOT 2
- Write headers when no data? HOT 1
- Non-descript exception thrown for Sylvan.Data.Csv HOT 3
- Processing files with large numbers of errors is rather slow HOT 3
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 sylvan.