readUTFFile

Reads any type of Unicode/UTF text file (UTF-8, UTF-16, UTF-32, big or little endian), detects BOM, and automatically converts it to native endianness and whatever string type is specified in TOut.

TOut
readUTFFile
(
TOut
TFilename
)
(
TFilename filename
)
if (
isSomeString!TOut &&
isSomeString!TFilename
)

Examples

string utf8 = readUTFFile!string ( "ANY_unicode_file.txt" ); wstring utf16 = readUTFFile!wstring( "ANY_unicode_file.txt" ); dstring utf32 = readUTFFile!dstring( "ANY_unicode_file.txt" );

Meta