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 9285669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:13:32+00:00 2026-06-18T19:13:32+00:00

I am making a adz collector, so i get the ad from a website

  • 0

I am making a adz collector, so i get the ad from a website and i take the html get the title,price,description.And keep inputting into a DataTable at the end export the DataTable to CSV.But the issue is the text is fine in the code but when its exported to CSV its like :

 · 75% of the Controller’s time will focus on accounting: Their role includes:  o 
 Bookkeeping  o Payroll  o Monthly HST  o Trust accounting; Ensuring compliance with the     Real 
 Estate Council requirements  o Financial Statement Preparation  · 25% Will be       management 
 functions:  o Supervise and assist with conveyancing  o Supervise all the office staff (4 - 
 6)  o Other day to day management functions.   Requirements and Qualifications  Essential 
 Skills   · Experience working with government regulated financial reporting  · Experience 
 working with large numbers of people in a customer service oriented role  ·     Experience with 
 Trust Accounting    Additional Assets ....

There are symboles everywhere , the code i use to export is below:

public  void DataTable2CSV(DataTable table, string filename, string seperateChar)
    {

        StreamWriter sr = null;

        try
        {

            sr = new StreamWriter(filename, true);
            string seperator = "";
            StringBuilder builder = new StringBuilder();


                foreach (DataColumn col in table.Columns)
                {

                    builder.Append(seperator).Append(col.ColumnName);

                    seperator = seperateChar;
                }

                sr.WriteLine(builder.ToString());


            foreach (DataRow row in table.Rows)
            {

                seperator = "";
                builder = new StringBuilder();
                foreach (DataColumn col in table.Columns)
                {

                    builder.Append(seperator).Append(row[col.ColumnName]);
                    seperator = seperateChar;

                }

                sr.WriteLine(builder.ToString());

            }

        }

        finally
        {

            if (sr != null)
            {

                sr.Close();

            }

        }

    } 
  • 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-18T19:13:34+00:00Added an answer on June 18, 2026 at 7:13 pm

    You have text encoding confusion. In other words, the encoding of the data you are writing to the CSV file does not match the encoding expected by the CSV viewer (e.g. Excel).

    For more detail see

    Character Encoding and the ’ Issue

    In the particular ’ example, this is a typical CP1252 representation of the Unicode Character ‘RIGHT SINQLE QUOTATION MARK’ (U+2019) ’ which was been read using UTF-8. In UTF-8, that character exist of the bytes 0xE2, 0x80 and 0x99. If you check the CP1252 codepage layout, then you’ll see that those bytes represent exactly the characters â, € and ™.

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

Sidebar

Related Questions

im making an application where i have to load my database from html file
When making a call to jQuery get , how does one specify HTML elements
Making a quick JQuery demo where clicking a table element changes it from black
Making this tutorial: http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html I have ListActivity-derived class and onCreateContextMenu, onContextItemSelected overrides. I think
Making a left hand side menu for my website. Should I create a Unordered
Making an ajax call to return some data from the server. The data comes
Making a SMS App and it is going well so far, but ran into
making a thumbnail from video using the picker is straight forward. However, when I
Making a specific word entered into a textbox trigger a password prompt that when
I making a web app in Flex using global coordinates I get the coordinates

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.