473,378 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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:

Expand|Select|Wrap|Line Numbers
  1.  
  2.  StreamReader readFile = new StreamReader(@"c:\test.csv", Encoding.GetEncoding(932);
  3.          {
  4.  
  5.  
  6.              string line;
  7.              while ((line = readFile.ReadLine()) != null)
  8.              {
  9.                  line = readFile.ReadLine();
  10.  
  11.                  while (line != null)
  12.                  {
  13.                      line = readFile.ReadLine();
  14.                  }
  15.                  Response.Write(line);
  16.  
  17.              }
  18.              readFile.Close();
  19.          }
  20.  
  21.  
Nov 29 '10 #1
1 3092
Fuzz13
110 100+
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?
Dec 7 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mukesh Gupta | last post by:
Hello, I want to read MS Excel(2000)file contents from my C++ program. How it can be done. Is there any component as we have in VB(MS Excel 9.0) Can Any body help me in this matter. Mukesh...
7
by: Frank.Sebesta | last post by:
I have a wedge mag stripe reader that I swipe when ask to input information in a query. How do I filter the unwanted characters. Apparently there are two mag stripes that are read every time I...
1
by: Turner, GS \(Geoff\) | last post by:
> -----Original Message----- > From: siliconwafer > Posted At: 19 August 2005 15:20 > Posted To: c > Conversation: reading an excel file in C? > Subject: reading an excel file in C? > > >...
4
by: Ram | last post by:
Dear All, Good Day I am trying to convert a file which is generated on AS400 with codepage 00420 (arabic & English data combination) with no success. But using the same code( and changing 20420...
4
by: David Beck | last post by:
I donwnload some files for processing every day that have unwanted characters in them. In VB6 I use the InputB to read in the text and the StrConv. vLinesFromFile =...
0
by: Peter | last post by:
I am having a problem reading an Excel file that is XML based. The directory I am reading contains Excel files that can be of two types. Either generic Microsoft based or XML based. I am reading...
4
by: Phoebe. | last post by:
Hi, Good Day! Reading 1 excel file into a dataset is fine. How can I read multiple excel with the same data structure into 1 dataset? How can I append those data? Can someone help? Thanks in...
3
by: et | last post by:
How can I strip out unwanted characters in a string before updating the database? For instance, in names & addresses in our client table, we want only letters and numbers, no punctuation. Is...
4
by: vvenk | last post by:
Hello: I have a string, "Testing_!@#$%^&*()". It may have single and double quotations as well. I would like to strip all chararcters others than a-z, A-Z, 0-9 and the comma. I came across...
6
by: cmdolcet69 | last post by:
I have a value bieng added into my array that displays correctly in the textbox as 0.10 however when i read from my array into an excel spreadsheet I get the value 0.10 how can I get rid of the ...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.