
June 22nd, 2004
03:55 AM
Parsing A Microsoft Word-generated HTML file
Using PHP to include an HTML file saved from Microsoft Word displays some horrid horrid things. Is there anyway to strip out Microsoft's worthless code or force a certain character set? To see what I mean: http://kunatri.pair.com/enet2/websites/academyoceangrille/menu.php?menu=lunch
___________________
- Matthew McVickar

June 22nd, 2004
04:39 AM
Neverside Newbie
Status: Offline!
This may be of some help if run on a windows system.
http://www.phpclasses.org/browse.html/package/388
___________________
RAAAH

June 22nd, 2004
05:29 AM
Nobody fucks with my title.
Status: Offline!
Would it really be so hard to convert the menu to HTML? I think Word even has Export to HTML functionality somewhere... (I'm not sure how good the resulting HTML would look, though.)
Also, there are some Windows extensions for PHP available.
___________________
<3

June 22nd, 2004
05:46 AM
Oxy: I am running Apache, not IIS.
Noel: That is the exported HTML. Not even Microsoft's own browser can parse the code correctly. But-- hmm...
(tries something else)
I just removing the charset declaration. That improved the look slightly in my amazing browser (Safari), but IE is still hacking up a lung.
Any advice?
___________________
- Matthew McVickar
Last edited by Matthew_Aaron, June 22nd, 2004 05:50 AM (Edited 1 times)

June 22nd, 2004
07:29 PM
Neversidian
Status: Offline!
maybe tell the client to not use crappy software to make html?
___________________
Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

June 22nd, 2004
09:44 PM
BigToach: I'd love to, believe me, but it's not an option. That, also, would be solving the wrong problem. Why not tell Microsoft to stop making crappy software?
___________________
- Matthew McVickar