{"author_name":"potisan","width":"100%","description":"\u30d5\u30a1\u30a4\u30eb\u306bUTF-16\u6587\u5b57\u5217\uff08std::wstring_view\u304c\u5bfe\u5fdc\u3059\u308b\u30c7\u30fc\u30bf\uff09\u3092\u51fa\u529b\u3059\u308b\u306b\u306fstd::ofstream\u3092\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u3067\u4f7f\u7528\u3057\u307e\u3059\u3002\u6b21\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u6e96\u5099\u3057\u3066\u304a\u304f\u3068\u4fbf\u5229\u3060\u3068\u601d\u3044\u307e\u3059\u3002 #include <fstream> #include <filesystem> // UTF-16\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30b9\u3078\u51fa\u529b\u3057\u307e\u3059\u3002BOM\u306f\u4ed8\u52a0\u3057\u307e\u305b\u3093\u3002 void write_utf16(std::filesystem::path path, std::wstring_view s) { std::ofstream fout(path, std::ios::binary); fout.w\u2026","author_url":"https://blog.hatena.ne.jp/potisan/","categories":["C++","Windows"],"provider_url":"https://hatena.blog","blog_url":"https://potisan-programming-memo.hatenablog.jp/","title":"C++20&Win API \u30d5\u30a1\u30a4\u30eb\u306bUTF-16\u6587\u5b57\u5217\u3092\u51fa\u529b\u3059\u308b","version":"1.0","provider_name":"Hatena Blog","image_url":null,"blog_title":"potisan\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e1\u30e2","height":"190","published":"2021-09-24 22:37:01","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2021%2F09%2F24%2F223701\" title=\"C++20&amp;Win API \u30d5\u30a1\u30a4\u30eb\u306bUTF-16\u6587\u5b57\u5217\u3092\u51fa\u529b\u3059\u308b - potisan\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","url":"https://potisan-programming-memo.hatenablog.jp/entry/2021/09/24/223701"}