Solved

HTML File - Saving

Posted on 2004-04-26
8
572 Views
Last Modified: 2011-10-03
I have an HTML. When I open it and save as HTML in a browser, all "<", ">" etc. are getting converted to some text. Here is a sample:

Original text:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML version="-//W3C//DTD HTML 4.01 Transitional//EN"><HEAD><TITLE>MLiFlow 2.0 Converted Document</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"><LINK
href="c:\skv\txt\TUDstyle.css" type=text/css rel=stylesheet></LINK>
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV class=head>

After saving:

+/v8APAAh-DOCTYPE HTML PUBLIC +ACI--//W3C//DTD HTML 4.0 Transitional//EN+ACIAPg-
+ADw-HTML version+AD0AIg--//W3C//DTD HTML 4.01 Transitional//EN+ACIAPgA8-HEAD+AD4APA-TITLE+AD4-MLiFlow 2.0 Converted Document+ADw-/TITLE+AD4-
+ADw-META http-equiv+AD0-Content-Type content+AD0AIg-text/html+ADs- charset+AD0-utf-7+ACIAPgA8-LINK
href+AD0AIg-c:+AFw-skv+AFw-txt+AFw-TUDstyle.css+ACI- type+AD0-text/css rel+AD0-stylesheet+AD4APA-/LINK+AD4-
+ADw-META content+AD0AIg-MSHTML 6.00.2600.0+ACI- name+AD0-GENERATOR+AD4APA-/HEAD+AD4-
+ADw-BODY+AD4-
+ADw-DIV class+AD0-head+AD4-

Is there any patch or update to correct the above thing. Is there any IE update that i'm missing. Kindly help me.
0
Comment
Question by:vi_srikanth
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Accepted Solution

by:
MaB earned 400 total points
ID: 10917619
Hi vi_srikanth,
Sounds like you're using some encoding that isn't supported in your OS. Could you describe the exact steps you take to save as HTML.
(Are you from the browser window choosing "file-save as" and then in the dialogue "save as type" choose HTML.)

If so, try choose some other encoding in the selectbox beneath "save as type". Or go for "view-source" which should open the page in notepad and then save from there to a something.htm file.

BR MaB!
0
 
LVL 7

Assisted Solution

by:mark-b
mark-b earned 50 total points
ID: 10918816
How about viewing the source in an editor and saving it?

Right Click (View -> Source on IE menu) or -> View Source (opens in your editor-- most likely notepad) -> Save

-Mark
0
 
LVL 7

Expert Comment

by:mark-b
ID: 10918829
Oh.. I see MaB already suggested this.  Sorry!
0
 
LVL 7

Expert Comment

by:MaB
ID: 10918845
no problem mark-b :-)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Assisted Solution

by:stu215
stu215 earned 50 total points
ID: 10922213
Best bet would be to copy it all, and paste it into notepad, then save it and change the extension from .txt to .html

    as mark-b pointed out ....

~Stu :-)
0
 
LVL 10

Expert Comment

by:stu215
ID: 10922216
doh i mean Mab, Im blind today apparently ...

~Stu
0
 
LVL 4

Author Comment

by:vi_srikanth
ID: 10924937
Hi friends

Thanx for ur comments.

The above thing( +/v8APAAh . . . ) that I said, is what when I open the source of the htm file - thru IE - view source.

I missed one thing!
> When I open it and save as HTML in a browser
This opening and saving the HTML is done in an HTML editor that is designed by me. Before opening the HTML in my editor, it is perfect. And only after opening, and after correcting something in the HTML - the abovesaid problem happens.

I tried this way: I opened the HTML in IE, and then did that "Save As" to another file. Then, if I open that in my editor and did some change, it is perfect. IE "Save As" does some normalization which solves my problem.

Is there anyway to do this normalization programatically? In other words, is there any converter/commands that I can use to normalize an HTML?

Thanx
0
 
LVL 7

Expert Comment

by:MaB
ID: 10925403
Is there anyway to do this normalization programatically? In other words, is there any converter/commands that I can use to normalize an HTML?

Not that I know of. The problem has to do with the encoding your HTML editor uses. Notepad uses ASCII and doesn't add any formatting, that's one reason it's good for cut and paste when working with HTML.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jquery, html5 UI 1 61
HTML and CSS for a complex page 20 57
Finding (and replacing) text between two strings in Php 7 50
Datepicker in PHP 9 38
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now