?
Solved

HTML File - Saving

Posted on 2004-04-26
8
Medium Priority
?
608 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Accepted Solution

by:
MaB earned 1200 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 150 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
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 
LVL 7

Expert Comment

by:MaB
ID: 10918845
no problem mark-b :-)
0
 
LVL 10

Assisted Solution

by:stu215
stu215 earned 150 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

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

741 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