Solved

HTML File - Saving

Posted on 2004-04-26
8
580 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 7

Expert Comment

by:MaB
ID: 10918845
no problem mark-b :-)
0
 
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

810 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