First. Sorry for my english, i'm brazilian..
I need to move from ASP.NET to PHP, and in ASP.Net have this:
public void Write(string str)
{
byte[] data = Encoding.UTF8.GetBytes(str.ToString());
output.Write(data, 0, data.Length);
}
and, in PHP I tried this:
function Write($String)
{
$data = mb_convert_encoding($String, "UTF8", "Unicode");
return $data;
}
However, it does not return the same message..
I use this in ASP.NET with XML.
EDIT¹: Output is a MemoryStream
Thanks,