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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:41:24+00:00 2026-05-24T18:41:24+00:00

I have the following program that runs on specified csv files: using System; using

  • 0

I have the following program that runs on specified csv files:

using System;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        string path = @"C:/Documents and Settings/expn261/Desktop/SAPHR_Joiners_20110812.csv";
        string strCharater = File.ReadAllText(path,UTF7Encoding.UTF7);

        strCharater = strCharater.ToString();

        strCharater = Regex.Replace(strCharater, "[èéèëêð]", "e");
        strCharater = Regex.Replace(strCharater, "[ÉÈËÊ]", "E");
        strCharater = Regex.Replace(strCharater, "[àâä]", "a");
        strCharater = Regex.Replace(strCharater, "[ÀÁÂÃÄÅ]", "A");
        strCharater = Regex.Replace(strCharater, "[àáâãäå]", "a");
        strCharater = Regex.Replace(strCharater, "[ÙÚÛÜ]", "U");
        strCharater = Regex.Replace(strCharater, "[ùúûüµ]", "u");
        strCharater = Regex.Replace(strCharater, "[òóôõöø]", "o");
        strCharater = Regex.Replace(strCharater, "[ÒÓÔÕÖØ]", "O");
        strCharater = Regex.Replace(strCharater, "[ìíîï]", "i");
        strCharater = Regex.Replace(strCharater, "[ÌÍÎÏ]", "I");
        strCharater = Regex.Replace(strCharater, "[š]", "s");
        strCharater = Regex.Replace(strCharater, "[Š]", "S");
        strCharater = Regex.Replace(strCharater, "[ñ]", "n");
        strCharater = Regex.Replace(strCharater, "[Ñ]", "N");
        strCharater = Regex.Replace(strCharater, "[ç]", "c");
        strCharater = Regex.Replace(strCharater, "[Ç]", "C");
        strCharater = Regex.Replace(strCharater, "[ÿ]", "y");
        strCharater = Regex.Replace(strCharater, "[Ÿ]", "Y");
        strCharater = Regex.Replace(strCharater, "[ž]", "z");
        strCharater = Regex.Replace(strCharater, "[Ž]", "Z");
        strCharater = Regex.Replace(strCharater, "[Ð]", "D");
        strCharater = Regex.Replace(strCharater, "[œ]", "oe");
        strCharater = Regex.Replace(strCharater, "[Œ]", "Oe");
        //strCharater = Regex.Replace(strCharater, "[«»\u201C\u201D\u201E\u201F\u2033\u2036]", "\"");
        //strCharater = Regex.Replace(strCharater, "[\u2026]", "...");

        string path2 = (@"C:/Documents and Settings/expn261/Desktop/file.csv");
        StreamWriter sw = new StreamWriter(path2);
        sw.WriteLine(strCharater,UTF7Encoding.UTF7);
    }
}

The problem is that no matter which file I run it on the last 3 or 4 lines are not displayed.

What could the problem be?

  • 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-05-24T18:41:24+00:00Added an answer on May 24, 2026 at 6:41 pm

    You should use IDisposables as the StreamWriter in using(){}, like:

    using(StreamWriter sw = new StreamWriter(path2))
    {
        sw.WriteLine(strCharater, UTF7Encoding.UTF7);
    }
    

    In this case, the clean dispose will call the Close() method of the StreamWriter which will cause it to write it’s buffer to the file.

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

Sidebar

Related Questions

Assume that we have the following code: class Program { static volatile bool flag1;
I have a python program that reads floating point values using the following regular
I have a multithreaded application that runs using a custom thread pool class. The
I have a program that looks like the following: double[4][4] startMatrix; double[4][4] inverseMatrix; initialize(startMatrix)
I have a program that makes use of the following method to get a
I have a WiX installer that runs a program that downloads the latest version
I have the following test program. #include <iostream> #include <cstdlib> using namespace std; pthread_mutex_t
I have a Win32 program that runs on a loop. I would like to
So I have to write a program that is a flight reservation system. If
I have the following program: ~/test> cat test.cc int main() { int i =

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.