{"id":2706,"date":"2020-02-07T16:46:51","date_gmt":"2020-02-07T13:46:51","guid":{"rendered":"http:\/\/surgery.moscow\/smos\/?p=2706"},"modified":"2020-02-07T16:59:30","modified_gmt":"2020-02-07T13:59:30","slug":"%d0%9a%d0%be%d0%b4%d0%b8%d1%80%d0%be%d0%b2%d0%ba%d0%b0linux","status":"publish","type":"post","link":"https:\/\/surgery.moscow\/smos\/2020\/02\/07\/%d0%9a%d0%be%d0%b4%d0%b8%d1%80%d0%be%d0%b2%d0%ba%d0%b0linux\/","title":{"rendered":"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430:Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u041a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043b\u0438\u043d\u0443\u043a\u0441\u0430<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u043a\u043e\u043c\u0430\u043d\u0434\u0430 <strong> file -bi [filename]<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u043f\u0446\u0438\u044f             \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<br><strong> -b, &#8212;brief<\/strong>     \u041d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 <br><strong> -i, &#8212;mime<\/strong>     \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0442\u0438\u043f \u0444\u0430\u0439\u043b\u0430  \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 \u0444\u0430\u0439\u043b\u0430  test.txt:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong> file -bi<\/strong> test.txt<br> \u043e\u0442\u0432\u0435\u0442 : text\/plain; charset=utf-8<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439<strong> iconv <\/strong><br><br><strong>iconv -f WINDOWS-1251<\/strong> \u0438\u043c\u044f_\u0444\u0430\u0439\u043b\u0430_\u0438\u0437_\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e_\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c <strong>-t UTF-8<\/strong> > \u0438\u043c\u044f_\u0444\u0430\u0439\u043b\u0430_\u0432_\u043a\u043e\u0442\u043e\u0440\u044b\u0439_\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c<br><br><strong><strong>iconv -l<\/strong><\/strong> &#8212; \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043e\u043a<br><strong>iconv &#8212;help\u00a0\u00a0\u00a0<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>iconv<\/strong> -f [encoding] -t [encoding] -o [newfilename] [filename]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u043f\u0446\u0438\u044f                    \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> -f, &#8212;from-code    \u0438\u0437 \u043a\u0430\u043a\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<br> -t, &#8212;to-code     \u0432 \u043a\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b<br> -o, &#8212;output     \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0430\u0439\u043b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 \u0441 CP1251 (Windows-1251, Cyrillic)  \u043d\u0430  UTF-8:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>iconv -f cp1251 -t utf-8 <\/strong>test.txt<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 \u0441 ISO-8859-1 \u043d\u0430 utf-8 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0432  out.txt:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> <strong>iconv -f iso-8859-1 -t utf-8 -o<\/strong> out.txt test.txt<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 \u0441  ASCII  \u043d\u0430 UTF-8:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> <strong>iconv -f utf-8 -t ascii -o<\/strong> out.txt test.txt<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043b\u0438\u043d\u0443\u043a\u0441\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 file -bi [filename] \u041e\u043f\u0446\u0438\u044f \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 -b, &#8212;brief \u041d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,22],"tags":[],"class_list":["post-2706","post","type-post","status-publish","format-standard","hentry","category-internet","category-technology"],"_links":{"self":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/2706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/comments?post=2706"}],"version-history":[{"count":2,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/2706\/revisions"}],"predecessor-version":[{"id":2708,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/2706\/revisions\/2708"}],"wp:attachment":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/media?parent=2706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/categories?post=2706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/tags?post=2706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}