{"author_name":"hanaaaaaachiru","type":"rich","blog_url":"https://www.hanachiru-blog.com/","image_url":null,"provider_url":"https://hatena.blog","provider_name":"Hatena Blog","published":"2023-09-15 12:00:00","categories":["C#"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.hanachiru-blog.com%2Fentry%2F2023%2F09%2F15%2F120000\" title=\"\u3010C#\u3011Utf8Formatter.TryFormat\u3092\u7528\u3044\u3066\u4e00\u822c\u7684\u306a\u30c7\u30fc\u30bf\u578b\u3092Utf8 \u6587\u5b57\u5217\u3068\u3057\u3066\u66f8\u5f0f\u8a2d\u5b9a\u3059\u308b - \u306f\u306a\u3061\u308b\u306e\u30de\u30a4\u30ce\u30fc\u30c8\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u306f\u3058\u3081\u306b \u4eca\u56de\u306fUtf8Formatter.TryFormat\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 int value = 999; // e7, 3, 0, 0 Console.WriteLine(string.Join(\",\", BitConverter.GetBytes(value).Select(x => x.ToString(\"x\")))); // \u66f8\u304d\u8fbc\u307f\u5148\u306e\u30e1\u30e2\u30ea\u9818\u57df Span<byte> destination = new byte[4]; // \u4e00\u822c\u7684\u306a\u30c7\u30fc\u30bf\u578b\u3092 Utf8 \u6587\u5b57\u5217\u3068\u3057\u3066\u66f8\u5f0f\u8a2d\u5b9a\u3059\u308b Utf8Formatter.TryFormat(value, destinatio\u2026","blog_title":"\u306f\u306a\u3061\u308b\u306e\u30de\u30a4\u30ce\u30fc\u30c8","author_url":"https://blog.hatena.ne.jp/hanaaaaaachiru/","height":"190","version":"1.0","width":"100%","url":"https://www.hanachiru-blog.com/entry/2023/09/15/120000","title":"\u3010C#\u3011Utf8Formatter.TryFormat\u3092\u7528\u3044\u3066\u4e00\u822c\u7684\u306a\u30c7\u30fc\u30bf\u578b\u3092Utf8 \u6587\u5b57\u5217\u3068\u3057\u3066\u66f8\u5f0f\u8a2d\u5b9a\u3059\u308b"}