Mercurial > projects > dil
changeset 354:b03aaa9c6bc5
- Added some comments.
author | aziz |
---|---|
date | Sun, 26 Aug 2007 10:01:04 +0000 |
parents | a3847ea28fee |
children | 944a917447b4 |
files | trunk/src/dil/File.d |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/File.d Sun Aug 26 09:25:03 2007 +0000 +++ b/trunk/src/dil/File.d Sun Aug 26 10:01:04 2007 +0000 @@ -20,23 +20,23 @@ if (data.length >= 4) { if (data[0..3] == cast(ubyte[3])x"00 00 00") - text = toUTF8(cast(dchar[])utf32BEtoLE(data)); + text = toUTF8(cast(dchar[])utf32BEtoLE(data)); // UTF-32BE: 00 00 00 XX else if (data[1..4] == cast(ubyte[3])x"00 00 00") - text = toUTF8(cast(dchar[])data); + text = toUTF8(cast(dchar[])data); // UTF-32LE: XX 00 00 00 else - text = cast(char[])data; + text = cast(char[])data; // UTF-8 } else if (data.length >= 2) { - if (data[0] == 0) + if (data[0] == 0) // UTF-16BE: 00 XX text = toUTF8(cast(wchar[])utf16BEtoLE(data)); - else if (data[1] == 0) + else if (data[1] == 0) // UTF-16LE: XX 00 text = toUTF8(cast(wchar[])data); else - text = cast(char[])data; + text = cast(char[])data; // UTF-8 } else - text = cast(char[])data; + text = cast(char[])data; // UTF-8 break; case BOM.UTF8: text = cast(char[])data[3..$];