dotnet / dotnet/dotnet-api-docs

Need a property to handle linebreak character

Open
#1,454 0 comments 0 reactions 0 assignees View on GitHub
area-Microsoft.VisualBasic dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

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)](https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.fileio.textfieldparser.hasfieldsenclosedinquotes?view=netframework-4.7.2#Microsoft_VisualBasic_FileIO_TextFieldParser_HasFieldsEnclosedInQuotes)
* Content Source: [xml/Microsoft.VisualBasic.FileIO/TextFieldParser.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.VisualBasic.FileIO/TextFieldParser.xml)
* Product: **dotnet-api**
* GitHub Login: @KathleenDollard
* Microsoft Alias: **kdollard**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.