Link to home
Start Free TrialLog in
Avatar of vi_srikanth
vi_srikanth

asked on

HTML File - Saving

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.
ASKER CERTIFIED SOLUTION
Avatar of MaB
MaB
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh.. I see MaB already suggested this.  Sorry!
no problem mark-b :-)
SOLUTION
Avatar of stu215
stu215
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
doh i mean Mab, Im blind today apparently ...

~Stu
Avatar of vi_srikanth
vi_srikanth

ASKER

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
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.