Description
This might be a feature enhancement rather than a bug. I encounter scenarios where I need to ingest comma-separated text which contains one or more line breaks in a given field. Example:
https://www.contoso.com,404,https://www.contoso.com,404,,"MBNA Limited
Unknown",84.45.99.82,1604002,2/13/2020,COMODO RSA Domain Validation Secure Server CA,SHA256withRSA
The field "MBNA Limited\nUnknown" is not handled properly because the line break character is interpreted as the end of a record. It would be nice if the function of the HasFieldsEnclosedInQuotes property could be extended to also ignore line breaks within quotes in addition to the indicated delimiters. Another option would be to add an additional string[] property in which the developer could explicitly indicate what character/character combinations should be interpreted as the end of a line
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 75dc6364-b18d-3eba-8c1a-cd2ed3867b81
- Version Independent ID: ca02ef80-dce4-ebf3-2af5-2ec20d2c1309
- Content: TextFieldParser.HasFieldsEnclosedInQuotes Property (Microsoft.VisualBasic.FileIO)
- Content Source: xml/Microsoft.VisualBasic.FileIO/TextFieldParser.xml
- Product: dotnet-api
- GitHub Login: @KathleenDollard
- Microsoft Alias: kdollard