473,378 Members | 1,622 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.

Reading file to include in ASPX page drops characters

I have a main ASPX page that loads HTML pages into it.
If the HTML page contains characters like the (R) registered or (C) or apostrophe then these characters are replaced (usualy with a question mark) or dropped.
How can I retain these characters?

Thanks for you help
Nov 20 '05 #1
3 2062
* "=?Utf-8?B?VGVnbw==?=" <fs*****@hotmail.com> scripsit:
I have a main ASPX page that loads HTML pages into it.
If the HTML page contains characters like the (R) registered or (C) or
apostrophe then these characters are replaced (usualy with a question
mark) or dropped.
How can I retain these characters?


What encoding do you use for this/these page(s)?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
* "=?Utf-8?B?VGVnbw==?=" <an*******@discussions.microsoft.com> scripsit:
I am not sure, I am very inexperienced with encoding terminology.
The page I am including is a simple HTML page (starts off with <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">)
It simply has this in its body tags:
<body>This is text from the HTML page.® fadsfasd</body>
When displayed inside the ASPX, it drops the (R) and replaces with different characters.
I tried a dynamic include, tried to use system.io to readstream and display it in a literal, still same result.


When using a 'StreamReader' to read the file, did you test it with
different encodings? The ctor of 'StreamReader' takes an 'Encoding'.
So try to read the file with 'System.Text.Encoding.Default' and other
encodings.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
* "=?Utf-8?B?VGVnbw==?=" <an*******@discussions.microsoft.com> scripsit:
I am not sure, I am very inexperienced with encoding terminology.
The page I am including is a simple HTML page (starts off with <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">)
It simply has this in its body tags:
<body>This is text from the HTML page.® fadsfasd</body>
When displayed inside the ASPX, it drops the (R) and replaces with different characters.
I tried a dynamic include, tried to use system.io to readstream and display it in a literal, still same result.


When using a 'StreamReader' to read the file, did you test it with
different encodings? The ctor of 'StreamReader' takes an 'Encoding'.
So try to read the file with 'System.Text.Encoding.Default' and other
encodings.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

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

Similar topics

3
by: muser | last post by:
With the following code I'm trying to read a text file (infile) and output inaccuracies to the error file (printerfile). The text file is written and stored on disk, while the printerfile has to be...
1
by: muser | last post by:
The following program reads two lines of a file in my A drive and reads no more. Can some sarmartian tell me why that is. Please copy and paste the program into your own compiler please. ...
4
by: Dave | last post by:
Hello all, The scheme shown below to move a text file's contents into a std::string works with one exception: it drops the carriage return and line feed characters. How may I, in a...
3
by: Nelson R. | last post by:
Hi, im using a form to get some input from the user. This form is in a HTML file. When I post the form directly to my email, i receive all fields correctly. Example test.html: <FORM...
7
by: Drew Berkemeyer | last post by:
Hello, I'm using the following code to read a text file in VB.NET. Dim sr As StreamReader = File.OpenText(strFilePath) Dim input As String = sr.ReadLine() While Not input Is Nothing...
30
by: siliconwafer | last post by:
Hi All, I want to know tht how can one Stop reading a file in C (e.g a Hex file)with no 'EOF'?
11
by: Freddy Coal | last post by:
Hi, I'm trying to read a binary file of 2411 Bytes, I would like load all the file in a String. I make this function for make that: '-------------------------- Public Shared Function...
24
by: Bill | last post by:
Hello, I'm trying to output buffer content to a file. I either get an access violation error, or crazy looking output in the file depending on which method I use to write the file. Can anyone...
6
by: efrenba | last post by:
Hi, I came from delphi world and now I'm doing my first steps in C++. I'm using C++builder because its ide is like delphi although I'm trying to avoid the vcl. I need to insert new features...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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?

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.