write_wtext_file_binary_cstdio(Windows)

指定のワイド文字列をバイナリモードで書き込むwrite_wtext_file_binary_cstdioを作る。
cpp_file_utility_cstdio.hは、

と書く。
cpp_file_utility_cstdio.cppは、

と書く。
main.cppは、

と書く。

実行するとこうなって、
実行するとこうなって、

実行するとこうなって、

BOM無しのUTF-16LE
BOM無しのUTF-16LE

BOM無しのUTF-16LE。

Test/cpp/write_wtext_file_binary_cstdio/Windows/src/write_wtext_file_binary_cstdio at master · bg1bgst333/Test · GitHub

convert_endian_16bit_byte_array

16bitエンディアン変換関数convert_endian_16bit_byte_arrayを作る。
main.cは、

と書く。

実行するとこうなる。
実行するとこうなる。

実行するとこうなる。

src.txtはUTF-16BEだが、dest.txtはUTF-16LE。
src.txtはUTF-16BEだが、dest.txtはUTF-16LE。

src.txtはUTF-16BEだが、dest.txtはUTF-16LE。

Test/c/convert_endian_16bit_byte_array/convert_endian_16bit_byte_array/src/convert_endian_16bit_byte_array at master · bg1bgst333/Test · GitHub

write_file_bom_utf8

UTF-8用のBOMを書き込む関数write_file_bom_utf8を作る。
main.cで、

と書く。

実行するとこうなる。
実行するとこうなる。

実行するとこうなる。

BOM付きUTF-8で出力されている。
BOM付きUTF-8で出力されている。

BOM付きUTF-8で出力されている。

Test/c/write_file_bom_utf8/write_file_bom_utf8/src/write_file_bom_utf8 at master · bg1bgst333/Test · GitHub