Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7975351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:37:13+00:00 2026-06-04T08:37:13+00:00

I have an odd problem. I try to read a csv file for a

  • 0

I have an odd problem.

I try to read a csv file for a datamigration. This is how the file looks (its UTF8 formatted)

"MIGRATIONID","ACCOUNTID","MIGRACCOUNTID","CONFIGID","MEDIUMID","PRIMCLASSID","SECCLASSID","SALESCODE","CONTENT","REGELNR","LIST_ATTRIBUTES","PACKAGE_TYPE","VERWIJSADVERTENTIE","NIET_PUBLICEREN"
"ITM-0015-0163","62222532","ACT-0000-4755","61635591","TGP","TG_P_GV_01","","TG_Print_GV","%NAME%|%STREETNAME%|%HOUSENUMBER%|%HOUSENUMBEREXT%||%POSTALCODE%|%LOCALITY%|%AREACODE%|%CONNECTIONNUMBER%|%URL%|%EMAIL%||%COMMERCIAL%||||||%PRODNR%","10","","","","FALSE"
"ITM-0015-0172","62222140","ACT-0000-4779","61636356","TGP","TG_P_GV_01","","TG_Print_GV","%NAME%|%STREETNAME%|%HOUSENUMBER%|%HOUSENUMBEREXT%||%POSTALCODE%|%LOCALITY%|%AREACODE%|%CONNECTIONNUMBER%|%URL%|%EMAIL%||%COMMERCIAL%||||||%PRODNR%","10","","","","FALSE"

As you can see, it is comma separated.

I read it using a streamreader:

System.IO.StreamReader file = new System.IO.StreamReader(documentFilePath, Encoding.UTF8);
while ((line = file.ReadLine()) != null)
{
    //perform the transformation
}

I have done this a million times without problems. However, when the rows are read, they suddenly turn up like this (copied from the debug watch):

"\"ITM-0015-0163\",\"62222532\",\"ACT-0000-4755\",\"61635591\",\"TGP\",\"TG_P_GV_01\",\"\",\"TG_Print_GV\",\"%NAME%|%STREETNAME%|%HOUSENUMBER%|%HOUSENUMBEREXT%||%POSTALCODE%|%LOCALITY%|%AREACODE%|%CONNECTIONNUMBER%|%URL%|%EMAIL%||%COMMERCIAL%||||||%PRODNR%\",\"10\",\"\",\"\",\"\",\"FALSE\""

Where do all these backslashes come from? Am i reading the file wrong. How can i prevent this? Because it wrecks up my further processing of the data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:37:14+00:00Added an answer on June 4, 2026 at 8:37 am

    The debugger just shows the value like it would appear in a literal in code (note that it’s surrounded by quotation marks, too). You can click the little magnifying glass to open a text-only view which will not put backslashes there.

    If you doubt this you can just write the text you read to the console to verify it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have odd problem: After starting server I got this error: undefined local variable
This is an odd problem, so I have to provide a bit of background.
I have this odd problem with a third party script. On our site a
This is my first question on S.O. I have a very odd problem. Below
I have a very odd problem. Whenever I try to use the Add View
I have an odd problem. When I try to compile the code below, it
I have run into a rather odd problem, my app crashes if I try
I have an odd problem with Django. I have a set of objects that
I have an odd problem where Hibernate is running more queries than I've asked
I have a odd problem with Google Maps APIv2 markers. I'm making a site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.