{"id":5031,"date":"2017-08-07T16:36:46","date_gmt":"2017-08-07T07:36:46","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=5031"},"modified":"2017-10-14T17:23:21","modified_gmt":"2017-10-14T08:23:21","slug":"vb-vbfromunicode-c-%ec%9c%bc%eb%a1%9c-%eb%b3%80%ea%b2%bd-%ec%83%98%ed%94%8c","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=5031","title":{"rendered":"vb vbFromUnicode c# \uc73c\ub85c \ubcc0\uacbd \uc0d8\ud50c"},"content":{"rendered":"<p><strong>VB Source<\/strong><\/p>\n<blockquote><p>\ud55c\uae00\uc744 2byte \ub85c \uacc4\uc0b0\ud558\uae30 \uc704\ud574 \uc544\ub798\ub85c \uac19\uc740 \ubcc0\uacbd\ud558\uc5ec \uc704\uce58\uc758 byte\ub4e4\uc744 \uac00\uc838\uc628\ub2e4.<\/p><\/blockquote>\n<pre class=\"top-margin:24 bottom-margin:24 lang:vb decode:true \" title=\"StrConv\" >Public Function Data_Cut(sDat, Start_len, last_len) As String\r\n            Dim Tmp_Chk As String\r\n\r\n            Tmp_Chk = StrConv(MidB(StrConv(sDat, vbFromUnicode), Start_len, last_len), vbUnicode)\r\n            Data_Cut = Tmp_Chk\r\n        End Function<\/pre>\n<p><strong>To C# Source<\/strong><\/p>\n<blockquote><p>C# \uc73c\ub85c \ubcc0\uacbd\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc774 \uc0ac\uc6a9\ud560\uc218 \uc788\ub2e4.<br \/>\nks_c_5601-1987 Encode \ub85c \ubcc0\uacbd\ud558\uba74 \ud55c\uae00\uc740 2\ubc14\uc774\ud2b8\ub85c \uc778\uc2dd\ud55c\ub2e4.\n<\/p><\/blockquote>\n<pre class=\"top-margin:24 bottom-margin:24 lang:c# decode:true \" title=\"getWordByByte\" >static string getWordByByte(string sDat, int Start_len, int last_len)\r\n        {\r\n            System.Text.Encoding myEncoding = System.Text.Encoding.GetEncoding(\"ks_c_5601-1987\");\r\n\r\n            byte[] buf = myEncoding.GetBytes(sDat);\r\n\r\n            return myEncoding.GetString(buf, Start_len, last_len);\r\n        }<\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>VB Source \ud55c\uae00\uc744 2byte \ub85c \uacc4\uc0b0\ud558\uae30 \uc704\ud574 \uc544\ub798\ub85c \uac19\uc740 \ubcc0\uacbd\ud558\uc5ec \uc704\uce58\uc758 byte\ub4e4\uc744 \uac00\uc838\uc628\ub2e4. Public Function Data_Cut(sDat, Start_len, last_len) As String Dim Tmp_Chk As String Tmp_Chk <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=5031\" title=\"vb vbFromUnicode c# \uc73c\ub85c \ubcc0\uacbd \uc0d8\ud50c\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-5031","post","type-post","status-publish","format-standard","hentry","category-devc"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/5031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5031"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/5031\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}