Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PHPでutf-8文字列をutf-16文字列に変換するにはどうすればよいですか?
mbstringは UTF-16をサポートしているため、mb_convert_encoding.
mb_convert_encoding
を使用することもできますiconv。
iconv
これはPHPでネイティブですが、すべてのテキストが1つの文字セットである必要があります。そうしないと、文字が破棄される可能性があります。