{"id":278,"date":"2020-12-08T08:44:51","date_gmt":"2020-12-07T23:44:51","guid":{"rendered":"https:\/\/sumomo.ohwaki.jp\/wordpress\/?p=278"},"modified":"2021-01-14T16:11:06","modified_gmt":"2021-01-14T07:11:06","slug":"net-core-net-5%e3%81%a7%e3%81%aeshift_jis%e3%82%a8%e3%83%b3%e3%82%b3%e3%83%bc%e3%83%87%e3%82%a3%e3%83%b3%e3%82%b0","status":"publish","type":"post","link":"https:\/\/sumomo.ohwaki.jp\/wordpress\/?p=278","title":{"rendered":".net core,.net 5\u3067\u306eShift_JIS\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6700\u8fd1\u3001SJIS\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092.net 5\u3067\u3044\u3058\u308b\u5fc5\u8981\u304c\u3042\u3063\u3066\u3001\u5fd8\u308c\u3066\u3044\u305f\u3053\u3068\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u30e1\u30e2\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">.net core\u3084.net 5\u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30bb\u30c3\u30c8\u3068\u3057\u3066\u3001Shift_JIS\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\" data-file=\"\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30bb\u30c3\u30c8\"><code>CodePage=1200, Name=utf-16 ,DisplayName=Unicode\nCodePage=1201, Name=utf-16BE ,DisplayName=Unicode (Big-Endian)\nCodePage=12000, Name=utf-32 ,DisplayName=Unicode (UTF-32)\nCodePage=12001, Name=utf-32BE ,DisplayName=Unicode (UTF-32 Big-Endian)\nCodePage=20127, Name=us-ascii ,DisplayName=US-ASCII\nCodePage=28591, Name=iso-8859-1 ,DisplayName=Western European (ISO)\nCodePage=65001, Name=utf-8 ,DisplayName=Unicode (UTF-8)<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Shift_JIS\u3084EUC\u306a\u3069\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u306f\u3001System.Text.Encoding.CodePages\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-bash\" data-file=\"CodePages\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8ffd\u52a0\" data-lang=\"Bash\"><code>&gt; dotnet add &lt;\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0&gt; package System.Text.Encoding.CodePages<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067\u306f\u30c0\u30e1\u3067\u3001Encododing\u3092\u53d6\u5f97\u3059\u308b\u4ee5\u524d\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u4e2d\u3067\u4e0b\u8a18\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-csharp\" data-file=\"CodePage\u30d7\u30ed\u30d0\u30a4\u30c0\u306e\u767b\u9332\" data-lang=\"C#\"><code>Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3067\u3001GetEncoding(&#8220;Shift_JIS&#8221;)\u3067Shift_JIS\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002\u3061\u306a\u307f\u306b\u3001\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30ea\u30b9\u30c8\u3092\u898b\u3066\u307f\u305f\u306e\u3060\u304c\u3001ISO-2022-JP\u304c\u7121\u3044\u3088\u3046\u306b\u307f\u3048\u308b\u306e\u3060\u304c\u30fb\u30fb\u30fb\u307e\u3041\u3001\u30e1\u30fc\u30eb\u4ee5\u5916\u306b\u306f\u4f7f\u308f\u306a\u3044\u3051\u3069\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\" data-file=\"\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u4e00\u89a7\"><code>CodePage=37, Name=IBM037 ,DisplayName=IBM037\nCodePage=437, Name=IBM437 ,DisplayName=IBM437\nCodePage=500, Name=IBM500 ,DisplayName=IBM500\nCodePage=708, Name=ASMO-708 ,DisplayName=ASMO-708\nCodePage=720, Name=DOS-720 ,DisplayName=DOS-720\nCodePage=737, Name=ibm737 ,DisplayName=ibm737\nCodePage=775, Name=ibm775 ,DisplayName=ibm775\nCodePage=850, Name=ibm850 ,DisplayName=ibm850\nCodePage=852, Name=ibm852 ,DisplayName=ibm852\nCodePage=855, Name=IBM855 ,DisplayName=IBM855\nCodePage=857, Name=ibm857 ,DisplayName=ibm857\nCodePage=858, Name=IBM00858 ,DisplayName=IBM00858\nCodePage=860, Name=IBM860 ,DisplayName=IBM860\nCodePage=861, Name=ibm861 ,DisplayName=ibm861\nCodePage=862, Name=DOS-862 ,DisplayName=DOS-862\nCodePage=863, Name=IBM863 ,DisplayName=IBM863\nCodePage=864, Name=IBM864 ,DisplayName=IBM864\nCodePage=865, Name=IBM865 ,DisplayName=IBM865\nCodePage=866, Name=cp866 ,DisplayName=cp866\nCodePage=869, Name=ibm869 ,DisplayName=ibm869\nCodePage=870, Name=IBM870 ,DisplayName=IBM870\nCodePage=874, Name=windows-874 ,DisplayName=windows-874\nCodePage=875, Name=cp875 ,DisplayName=cp875\nCodePage=932, Name=shift_jis ,DisplayName=shift_jis\nCodePage=936, Name=gb2312 ,DisplayName=gb2312\nCodePage=949, Name=ks_c_5601-1987 ,DisplayName=ks_c_5601-1987\nCodePage=950, Name=big5 ,DisplayName=big5\nCodePage=1026, Name=IBM1026 ,DisplayName=IBM1026\nCodePage=1047, Name=IBM01047 ,DisplayName=IBM01047\nCodePage=1140, Name=IBM01140 ,DisplayName=IBM01140\nCodePage=1141, Name=IBM01141 ,DisplayName=IBM01141\nCodePage=1142, Name=IBM01142 ,DisplayName=IBM01142\nCodePage=1143, Name=IBM01143 ,DisplayName=IBM01143\nCodePage=1144, Name=IBM01144 ,DisplayName=IBM01144\nCodePage=1145, Name=IBM01145 ,DisplayName=IBM01145\nCodePage=1146, Name=IBM01146 ,DisplayName=IBM01146\nCodePage=1147, Name=IBM01147 ,DisplayName=IBM01147\nCodePage=1148, Name=IBM01148 ,DisplayName=IBM01148\nCodePage=1149, Name=IBM01149 ,DisplayName=IBM01149\nCodePage=1200, Name=utf-16 ,DisplayName=Unicode\nCodePage=1201, Name=utf-16BE ,DisplayName=Unicode (Big-Endian)\nCodePage=1250, Name=windows-1250 ,DisplayName=windows-1250\nCodePage=1251, Name=windows-1251 ,DisplayName=windows-1251\nCodePage=1252, Name=windows-1252 ,DisplayName=windows-1252\nCodePage=1253, Name=windows-1253 ,DisplayName=windows-1253\nCodePage=1254, Name=windows-1254 ,DisplayName=windows-1254\nCodePage=1255, Name=windows-1255 ,DisplayName=windows-1255\nCodePage=1256, Name=windows-1256 ,DisplayName=windows-1256\nCodePage=1257, Name=windows-1257 ,DisplayName=windows-1257\nCodePage=1258, Name=windows-1258 ,DisplayName=windows-1258\nCodePage=1361, Name=Johab ,DisplayName=Johab\nCodePage=10000, Name=macintosh ,DisplayName=macintosh\nCodePage=10001, Name=x-mac-japanese ,DisplayName=x-mac-japanese\nCodePage=10002, Name=x-mac-chinesetrad ,DisplayName=x-mac-chinesetrad\nCodePage=10004, Name=x-mac-arabic ,DisplayName=x-mac-arabic\nCodePage=10005, Name=x-mac-hebrew ,DisplayName=x-mac-hebrew\nCodePage=10006, Name=x-mac-greek ,DisplayName=x-mac-greek\nCodePage=10007, Name=x-mac-cyrillic ,DisplayName=x-mac-cyrillic\nCodePage=10010, Name=x-mac-romanian ,DisplayName=x-mac-romanian\nCodePage=10017, Name=x-mac-ukrainian ,DisplayName=x-mac-ukrainian\nCodePage=10021, Name=x-mac-thai ,DisplayName=x-mac-thai\nCodePage=10029, Name=x-mac-ce ,DisplayName=x-mac-ce\nCodePage=10079, Name=x-mac-icelandic ,DisplayName=x-mac-icelandic\nCodePage=10081, Name=x-mac-turkish ,DisplayName=x-mac-turkish\nCodePage=10082, Name=x-mac-croatian ,DisplayName=x-mac-croatian\nCodePage=12000, Name=utf-32 ,DisplayName=Unicode (UTF-32)\nCodePage=12001, Name=utf-32BE ,DisplayName=Unicode (UTF-32 Big-Endian)\nCodePage=20000, Name=x-Chinese-CNS ,DisplayName=x-Chinese-CNS\nCodePage=20001, Name=x-cp20001 ,DisplayName=x-cp20001\nCodePage=20002, Name=x-Chinese-Eten ,DisplayName=x-Chinese-Eten\nCodePage=20003, Name=x-cp20003 ,DisplayName=x-cp20003\nCodePage=20004, Name=x-cp20004 ,DisplayName=x-cp20004\nCodePage=20005, Name=x-cp20005 ,DisplayName=x-cp20005\nCodePage=20105, Name=x-IA5 ,DisplayName=x-IA5\nCodePage=20106, Name=x-IA5-German ,DisplayName=x-IA5-German\nCodePage=20107, Name=x-IA5-Swedish ,DisplayName=x-IA5-Swedish\nCodePage=20108, Name=x-IA5-Norwegian ,DisplayName=x-IA5-Norwegian\nCodePage=20127, Name=us-ascii ,DisplayName=US-ASCII\nCodePage=20261, Name=x-cp20261 ,DisplayName=x-cp20261\nCodePage=20269, Name=x-cp20269 ,DisplayName=x-cp20269\nCodePage=20273, Name=IBM273 ,DisplayName=IBM273\nCodePage=20277, Name=IBM277 ,DisplayName=IBM277\nCodePage=20278, Name=IBM278 ,DisplayName=IBM278\nCodePage=20280, Name=IBM280 ,DisplayName=IBM280\nCodePage=20284, Name=IBM284 ,DisplayName=IBM284\nCodePage=20285, Name=IBM285 ,DisplayName=IBM285\nCodePage=20290, Name=IBM290 ,DisplayName=IBM290\nCodePage=20297, Name=IBM297 ,DisplayName=IBM297\nCodePage=20420, Name=IBM420 ,DisplayName=IBM420\nCodePage=20423, Name=IBM423 ,DisplayName=IBM423\nCodePage=20424, Name=IBM424 ,DisplayName=IBM424\nCodePage=20833, Name=x-ebcdic-koreanextended ,DisplayName=x-ebcdic-koreanextended\nCodePage=20838, Name=IBM-Thai ,DisplayName=IBM-Thai\nCodePage=20866, Name=koi8-r ,DisplayName=koi8-r\nCodePage=20871, Name=IBM871 ,DisplayName=IBM871\nCodePage=20880, Name=IBM880 ,DisplayName=IBM880\nCodePage=20905, Name=IBM905 ,DisplayName=IBM905\nCodePage=20924, Name=IBM00924 ,DisplayName=IBM00924\nCodePage=20932, Name=EUC-JP ,DisplayName=EUC-JP\nCodePage=20936, Name=x-cp20936 ,DisplayName=x-cp20936\nCodePage=20949, Name=x-cp20949 ,DisplayName=x-cp20949\nCodePage=21025, Name=cp1025 ,DisplayName=cp1025\nCodePage=21866, Name=koi8-u ,DisplayName=koi8-u\nCodePage=28591, Name=iso-8859-1 ,DisplayName=Western European (ISO)\nCodePage=28592, Name=iso-8859-2 ,DisplayName=iso-8859-2\nCodePage=28593, Name=iso-8859-3 ,DisplayName=iso-8859-3\nCodePage=28594, Name=iso-8859-4 ,DisplayName=iso-8859-4\nCodePage=28595, Name=iso-8859-5 ,DisplayName=iso-8859-5\nCodePage=28596, Name=iso-8859-6 ,DisplayName=iso-8859-6\nCodePage=28597, Name=iso-8859-7 ,DisplayName=iso-8859-7\nCodePage=28598, Name=iso-8859-8 ,DisplayName=iso-8859-8\nCodePage=28599, Name=iso-8859-9 ,DisplayName=iso-8859-9\nCodePage=28603, Name=iso-8859-13 ,DisplayName=iso-8859-13\nCodePage=28605, Name=iso-8859-15 ,DisplayName=iso-8859-15\nCodePage=29001, Name=x-Europa ,DisplayName=x-Europa\nCodePage=65001, Name=utf-8 ,DisplayName=Unicode (UTF-8)<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u3001SJIS\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092.net 5\u3067\u3044\u3058\u308b\u5fc5\u8981\u304c\u3042\u3063\u3066\u3001\u5fd8\u308c\u3066\u3044\u305f\u3053 &hellip; <a href=\"https:\/\/sumomo.ohwaki.jp\/wordpress\/?p=278\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,11,4],"tags":[],"class_list":["post-278","post","type-post","status-publish","format-standard","hentry","category-net","category-dotnetcore","category-4"],"_links":{"self":[{"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=278"}],"version-history":[{"count":4,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/278\/revisions"}],"predecessor-version":[{"id":289,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/278\/revisions\/289"}],"wp:attachment":[{"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}