473,382 Members | 1,180 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,382 software developers and data experts.

Text reader removing special characters

Hi, I have a text reader that is parsing a file, I have a
number of lines with accents eg. "Herr Dietman Löflers
(CEO)" my text reader returns: "Herr Dietman Lflers
(CEO)", it drops all the characters with the accents. Is
there a way to keep them in?

Thanks in advance for any help.

dave
Jul 21 '05 #1
3 3647
David,

Make sure you use the encoding that matches the text encoding in the
file you're reading. The StreamReader class - if that's what you're
using - has a number of constructors that lets you specify the
appropriate Encoding.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 21 '05 #2
David,

Make sure you use the encoding that matches the text encoding in the
file you're reading. The StreamReader class - if that's what you're
using - has a number of constructors that lets you specify the
appropriate Encoding.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 21 '05 #3
This great overview from Joel on Software may be of some help.

http://www.joelonsoftware.com/articles/Unicode.html

Tom Clement
Apptero, Inc.

"David Lambert" <mr************@hotmail.com> wrote in message
news:00****************************@phx.gbl...
Hi, I have a text reader that is parsing a file, I have a
number of lines with accents eg. "Herr Dietman Löflers
(CEO)" my text reader returns: "Herr Dietman Lflers
(CEO)", it drops all the characters with the accents. Is
there a way to keep them in?

Thanks in advance for any help.

dave
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David Lambert | last post by:
Hi, I have a text reader that is parsing a file, I have a number of lines with accents eg. "Herr Dietman Löflers (CEO)" my text reader returns: "Herr Dietman Lflers (CEO)", it drops all the...
3
by: Wade G. Pemberton | last post by:
Help!: I use javascript to format repetitive data from a web page input FORM into a long string , and save it as lines of comma delimited data in a text file on a Unix server. The text...
1
by: SStewart | last post by:
Does anyone know a good regex expression for removing all special characters from a string, allowing only alphanumeric?
4
by: Jerry Camel | last post by:
I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works great, except for the fact that no matter what field...
12
by: Adam J. Schaff | last post by:
I am writing a quick program to edit a binary file that contains file paths (amongst other things). If I look at the files in notepad, they look like: ...
12
by: Jerry Camel | last post by:
Not sure if this is a good place to post this... I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works...
11
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in...
10
by: korund | last post by:
We can use special characters ('\n') to add line breaks in text in JavaScript popup Alert boxes. there is also few additional special characters: \' single quote \" double quote \&...
13
by: sonald | last post by:
Hi, Can anybody tell me how to change the text delimiter in FastCSV Parser ? By default the text delimiter is double quotes(") I want to change it to anything else... say a pipe (|).. can anyone...
3
by: Gary | last post by:
I am wondering what is the fastest way to get plain text such as "abc def 12" from an HTML string. I can parse it, but not sure how to deal with those special characters, such as & and >. Is...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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:
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.