Unwanted characters while reading Japanese from a Excel based CSV file.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Manikrag
    New Member
    • Jun 2009
    • 62

    Unwanted characters while reading Japanese from a Excel based CSV file.

    I have excel file which has got mixed of Japanese & English written in it. I need to read it using stream reader, I changed it's extension as .CSV and now I am trying to read all the content.

    While reading, I am getting random numbers/alphabets/and hexa blocks.

    Can anyone please have a look and let me know what is the best way to read out Japanese from a excel changed CSV file?

    Here is my code:

    Code:
     StreamReader readFile = new StreamReader(@"c:\test.csv", Encoding.GetEncoding(932);
             {
    
    
                 string line;
                 while ((line = readFile.ReadLine()) != null)
                 {
                     line = readFile.ReadLine();
    
                     while (line != null)
                     {
                         line = readFile.ReadLine();
                     }
                     Response.Write(line);
    
                 }
                 readFile.Close();
             }
  • Fuzz13
    New Member
    • Jun 2010
    • 110

    #2
    I'm confused on what your goal is. Are you trying to remove the japanese characters, or read in the characters as the actual character and not a box?

    Comment

    Working...