473,396 Members | 1,832 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,396 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 3649
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.