Cpdf::utf8toUtf16BE
convert UTF-8 to UTF-16 with an additional byte order marker at the front if required.
based on the excellent TCPDF code by Nicola Asuni and the RFC for UTF-8 at http://www.faqs.org/rfcs/rfc3629.html
- Author: Orion Richardson
Signature
public function utf8toUtf16BE(string&
$text,
[boolean
$bom = true] )
Parameters
$text
— string- UTF-8 string to process
$bom
— boolean- whether to add the byte order marker
Returns
- string
- UTF-16 result string