On Wed, Apr 02, 2003 at 01:31:36PM +0200, Michel Mouly wrote:
Hi!
Did anybody ever tried to port texvc on Windows??
I (=author of texvc) certainly didn't.
Windows on servers is not really relevant.
I did not, but trying to emulate it, I found no way to
handle correctly the
character + in a command line
argument. This is quite annoying for math formulae!
My emulation is via a php script. The problem could be because of DOS or of
php. I tried to get some help on the windows-php forum, and the answers I
got are not conclusive: it could then be a DOS issue, in which case the
present approach for the interface between outputpage.php and texvc will be
difficult to port on Windows...
In addition, the php function escapeshellarg does not seem to be adapted to
Windows, either.
My original approach, using a file as interface, has not such problem.
I originally planned to use popen2-based interface, but for some reason
it's off by default in PHP.
In such case texvc.ml's lines:
Texutil.set_encoding (try Sys.argv.(4) with _ -> "UTF-8");
try render Sys.argv.(1) Sys.argv.(2) (Parser.tex_expr lexer_token_safe
(Lexing.from_string Sys.argv.(3)))
need to be replaced by
Texutil.set_encoding (try Sys.argv.(3) with _ -> "UTF-8");
try render Sys.argv.(1) Sys.argv.(2) (Parser.tex_expr lexer_token_safe
(Lexing.from_channel stdin))
If your php is compiled with popen2 (does it work on windows at all ?)
you could just put formula onto it's stdin, close it, and then read answer from
its stdout.