Moving from ASP.Net to PHP - Encoding -


first. sorry english, i'm brazilian..

i need move asp.net php, , 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 tried this:

function write($string) {      $data = mb_convert_encoding($string, "utf8", "unicode");      return $data; } 

however, not return same message..

i use in asp.net xml.

edit¹: output memorystream

thanks,


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -