{"id":1396,"date":"2013-11-23T09:24:17","date_gmt":"2013-11-23T09:24:17","guid":{"rendered":"http:\/\/brain.payzip.co.kr\/?p=1396"},"modified":"2013-11-23T09:24:17","modified_gmt":"2013-11-23T09:24:17","slug":"python-unicodeencodeerror-%ed%8c%8c%ec%9d%b4%ec%8d%ac-%ec%9d%b8%ec%bd%94%eb%94%a9-%ec%97%90%eb%9f%ac","status":"publish","type":"post","link":"https:\/\/blog.goorigo.com\/?p=1396","title":{"rendered":"Python : UnicodeEncodeError \/ \ud30c\uc774\uc36c \uc778\ucf54\ub529 \uc5d0\ub7ec"},"content":{"rendered":"<p>pyscripter 2.7 \uc5d0\uc11c \ucf54\ub529\ud6c4 run \uc744 \ud574\ubcf4\uba74<br \/>\n\uc544\ub798\uc640 \uac19\uc740 \uc5d0\ub7ec\uac00 \ub098\uba74\uc11c \uc2e4\ud589\uc774 \uc548\ub429\ub2c8\ub2e4.<\/p>\n<p>UnicodeEncodeError: &#8216;ascii&#8217; codec can&#8217;t encode characters in position 22-25: ordinal not in range(128)<\/p>\n<p>\uc5ec\ub7ec\ub0a0 \uace0\uc0dd\ud574\uc11c \uc778\ud130\ub137\uc744 \ucc3e\uc544\ubcf4\ub2c8 \ud574\uacb0\ubc29\ubc95\uc744 \ucc3e\uc558\uc2b5\ub2c8\ub2e4.<\/p>\n<p>C:\\Python27\\Lib\\site.py<\/p>\n<p>def setencoding():<br \/>\n&#8220;&#8221;&#8221;Set the string encoding used by the Unicode implementation. The<br \/>\ndefault is &#8216;ascii&#8217;, but if you&#8217;re willing to experiment, you can<br \/>\nchange this.&#8221;&#8221;&#8221;<br \/>\nencoding = &#8220;ascii&#8221; # Default value set by _PyUnicode_Init()<br \/>\nif 1: # \uae30\uc874\uc5d0 0 \uc774\ub77c\uace0 \ub418\uc5b4\uc788\ub294 \uac83\uc744 1 \ub85c \uc218\uc815\ud558\uba74\ub429\ub2c8\ub2e4.<br \/>\n# Enable to support locale aware default string encodings.<br \/>\nimport locale<br \/>\nloc = locale.getdefaultlocale()<br \/>\nif loc[1]:<br \/>\nencoding = loc[1]<\/p>\n<p>\ucd9c\ucc98 :\u00a0<a href=\"http:\/\/redrebel.tistory.com\/archive\/20130329\">http:\/\/redrebel.tistory.com\/archive\/20130329<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>pyscripter 2.7 \uc5d0\uc11c \ucf54\ub529\ud6c4 run \uc744 \ud574\ubcf4\uba74 \uc544\ub798\uc640 \uac19\uc740 \uc5d0\ub7ec\uac00 \ub098\uba74\uc11c \uc2e4\ud589\uc774 \uc548\ub429\ub2c8\ub2e4. UnicodeEncodeError: &#8216;ascii&#8217; codec can&#8217;t encode characters in position 22-25: ordinal not in range(128) \uc5ec\ub7ec\ub0a0 \uace0\uc0dd\ud574\uc11c \uc778\ud130\ub137\uc744 \ucc3e\uc544\ubcf4\ub2c8&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts\/1396"}],"collection":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1396"}],"version-history":[{"count":0,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts\/1396\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}