I'm trying to convert input strings to UTF-8 using PHP. I know that mbstring()
and iconv()
can do it, but my problem is when the string's encoding is not supported by mbstring()
.
For example the Windows-1256 encoding!
I had found a way to fix this problem because I know the binary representation of that encoding, but my question is how to get the byte representation of a given non-ASCII string?