Hello! I'm trying to read data from a php-script I'm starting:
The php-code does something like:Code:System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = "\"" + sPhp + "php.exe" + "\""; proc.StartInfo.Arguments = "\"script.php "; proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.CreateNoWindow = true; proc.StartInfo.StandardOutputEncoding = Encoding.UTF32; proc.Start(); String sOutput = proc.StandardOutput.ReadToEnd(); proc.Close();
When running the php-script from console, it seems that all output is UTF-32. But having a look at sOutput, it only contents of the squares meaning an unprintable char.Code:ob_start(); print '<?xml version="1.0" encoding="UTF-32"?>'; print "<FirstNode>\r\n"; ... print mb_convert_encoding(ob_get_clean(), "UTF-32");
Any ideas what could be wrong?


Reply With Quote