{"id":11509,"date":"2026-03-25T15:59:14","date_gmt":"2026-03-25T06:59:14","guid":{"rendered":"https:\/\/code-plus.jp\/gp\/?page_id=11509"},"modified":"2026-03-25T15:59:14","modified_gmt":"2026-03-25T06:59:14","slug":"textchar-encoder","status":"publish","type":"page","link":"https:\/\/code-plus.jp\/gp\/tools\/textchar-encoder\/","title":{"rendered":"\u6587\u5b57\u30b3\u30fc\u30c9\u5909\u63db\u30c4\u30fc\u30eb\uff5cShift_JIS\u30fbEUC-JP\u3092UTF-8\u306b\u4e00\u62ec\u5909\u63db"},"content":{"rendered":"<!-- \u0f3b\u273f\ud835\udc0f\ud835\udc00\ud835\udc06\ud835\udc04-\u6587\u5b57\u30b3\u30fc\u30c9\u5909\u63db\u30c4\u30fc\u30eb \uff08\/tools\/textchar-encoder\/\uff09\n* \u30da\u30fc\u30b8\u30af\u30e9\u30b9\uff1apg-saracnvtvkaa bg-hackingGate\uff08WordPress\u304c\u5c0f\u6587\u5b57\u3067\u3057\u304b\u51fa\u529b\u3067\u304d\u306a\u3044\u305f\u3081\uff09\n* \u8b58\u5225\u30b3\u30fc\u30c9\uff1acnvtVkaA\uff08section\/dept \u306e\u30af\u30e9\u30b9\u540d, \u753b\u50cf\u540d\u306b\u4f7f\u7528\uff09\n\u0fd0\u0f36\u22b0\u27e1\u22b1\u0f36\u22b0\u27e1\u22b1\u0f36\u22b0\u27e1\u22b1\u0f36\u2740\u0f36\u22b0\u27e1\u22b1\u0f36\u22b0\u27e1\u22b1\u0f36\u22b0\u27e1\u22b1\u0f36\u0f04 -->\n<div class=\"pg-saracnvtvkaa bg-hackingGate\">\n\n<!-- \u0f3b.mezzala\uff08\u4f59\u767d\u8abf\u6574\uff1apage\u4e0a\uff09\u0f3a -->\n<hr class=\"spacer-mezzala\" \/>\n\n<hr id=\"ch-TextConverter\" anchor \/>\n  <header class=\"page-header mx-auto\">\n    <!-- \u2756\u30d1\u30f3\u304f\u305a\u30ea\u30b9\u30c8 --><div><!-- breadcrumb.php -->\n<style>\n\/* \u2756breadcrumb.leckermaul\uff08\u30d1\u30f3\u304f\u305a\u30ea\u30b9\u30c8\uff09\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u0f1a\u0f36\u22b0\u27e1\u22b1\u0f36\u0f1a\u0f3a*\/\n.zaratan .breadcrumb.leckermaul {\n\twidth: 100%;\n\tmax-width: calc(var(--zvw,1vw) * 92.5);\n\tmargin-inline: auto;\n}\n\n.zaratan .breadcrumb.leckermaul :is(ul, ol) {\n\tmin-height: 48px;\n\tline-height: initial;\n\tfont-size: 0;\n\tletter-spacing: 0;\n\toverflow: hidden;\n}\n\n.zaratan .breadcrumb.leckermaul li {\n\tdisplay: inline;\n\tline-height: 1.6;\n\tfont-size: clamp(0.775pc, calc(0.775pc + ((1vw - 3.6px) * 0.1563)), 0.8750pc);\n}\n\n.zaratan .breadcrumb.leckermaul li>*,\n.zaratan .breadcrumb.leckermaul li::before {\n\tposition: relative;\n\ttop: 0.125em;\n\tdisplay: inline-flex;\n\talign-items: center;\n}\n\n.zaratan .breadcrumb.leckermaul a {\n\tdisplay: inline;\n\tcolor: var(--c-secondary-600, hsl(224, 25%, 43%));\n\tmargin-right: .5em;\n}\n\n.zaratan .breadcrumb.leckermaul li:nth-of-type(n+2) a {\n\tmargin-left: .5em;\n}\n\n\/* \u73fe\u5728\u306e\u30da\u30fc\u30b8\uff08\u30ea\u30f3\u30af\u306a\u3057\u3002<span aria-current=\"page\">\uff09 *\/\n.zaratan .breadcrumb.leckermaul [aria-current=\"page\"] {\n\tdisplay: inline;\n\tmargin-inline: .5em;\n\tcolor: var(--c-base-550, hsl(224, 6%, 47%));\n}\n\n@media (any-hover:hover) {\n\t.zaratan .breadcrumb.leckermaul a:hover {\n\t\tcolor: var(--c-secondary-600, hsl(224, 25%, 43%));\n\t}\n}\n\n\/* .ma-home *\/\n.zaratan .breadcrumb.leckermaul .ma-home {\n\tvertical-align: top;\n}\n\n\/* .separator *\/\n.zaratan .breadcrumb.leckermaul li:nth-of-type(n+2)::before,\n.zaratan .breadcrumb.leckermaul.chevron-right li:nth-of-type(n+2)::before {\n\tcontent: \">\";\n\tcolor: var(--c-secondary-600, hsl(224, 25%, 43%))\n}\n\n.zaratan .breadcrumb.leckermaul.slash li:nth-of-type(n+2)::before {\n\tcontent: \"\/\";\n}\n\n.zaratan .breadcrumb.leckermaul.trigon-bullet li:nth-of-type(n+2)::before {\n\tcontent: \"\u2023\";\n}\n<\/style>\n\n\n<nav class=\"breadcrumb leckermaul py-0.5r mx-auto\" aria-label=\"\u30d1\u30f3\u304f\u305a\u30ea\u30b9\u30c8\">\n  <ul class=\"breadcrumb-wrapper\">\n    <!-- \u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u3092\u8868\u793a -->\n    <li><a href=\"https:\/\/code-plus.jp\/gp\/\"><i><\/i>\u30c8\u30c3\u30d7<\/a><\/li>\n\n          <!-- \u56fa\u5b9a\u30da\u30fc\u30b8\uff08\u305d\u308c\u4ee5\u5916\uff09\uff1a \u5148\u7956\u30da\u30fc\u30b8\u540d\u3068\u3001\u73fe\u5728\u306e\u30da\u30fc\u30b8\u540d\u3092\u8868\u793a -->\n      <li><a href=\"https:\/\/code-plus.jp\/gp\/tools\/\">Web\u30c4\u30fc\u30eb\u4e00\u89a7\uff5cHTML\/CSS\u30fb\u6587\u66f8\u7de8\u96c6\u30fb\u753b\u50cf\u7de8\u96c6<\/a><\/li><li class=\"current_page_item\"><span aria-current=\"page\">\u6587\u5b57\u30b3\u30fc\u30c9\u5909\u63db\u30c4\u30fc\u30eb\uff5cShift_JIS\u30fbEUC-JP\u3092UTF-8\u306b\u4e00\u62ec\u5909\u63db<\/span><\/li>    <!-- \/\/\/if (is_page()) -->\n\n  <\/ul>\n<\/nav><\/div>\n  <\/header><!-- \/\/\/.inheader -->\n\n  <!-- \u0f3b\u00a7\ud835\udc12\ud835\udc04\ud835\udc02\ud835\udc13\ud835\udc08\ud835\udc0e\ud835\udc0d\u0f3a -->\n  <section class=\"sect-cnvtVkaA-Intro contvis-auto\" style=\"contain-intrinsic-size:800px;\">\n    <header class=\"section__inheader innerA mx-auto scroll-fadeIn\">\n      <div class=\"hgroup-wrapper d-iblock mb-0.5r\">\n        <h1 class=\"fz-xxl hdg-page mb-0.25pc\"><span>\u6587\u5b57\u30b3\u30fc\u30c9\u5909\u63db\u30c4\u30fc\u30eb\uff5cShift_JIS\u30fbEUC-JP\u3092UTF-8\u306b\u4e00\u62ec\u5909\u63db<\/span><\/h1>\n        <p class=\"page-foreword fz-ss\">\n          Shift_JIS \/ EUC-JP \u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092 UTF-8 \u306b\u4e00\u62ec\u5909\u63db\u3002\u30c9\u30e9\u30c3\u30b0&amp;\u30c9\u30ed\u30c3\u30d7\u3059\u308b\u3060\u3051\u3067\u5909\u63db\u6e08\u307f\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3002\n        <\/p>\n      <\/div><!-- \/\/\/.hgroup -->\n\n      <a class=\"fl-right badge is-outlined is-gray fz-xs bdrs-0.25r\" href=\"#ch-Explanation\">\n        <i class=\"icon mas ma-help\"><\/i>&nbsp;<span>\u4f7f\u3044\u65b9<\/span>\n      <\/a>\n    <\/header><!-- \/\/\/.inheader -->\n  <\/section>\n\n\n  <!-- \u0f3b\u00a7\ud835\udc12\ud835\udc04\ud835\udc02\ud835\udc13\ud835\udc08\ud835\udc0e\ud835\udc0d\u0f3a -->\n  <hr id=\"ch-Converter\" anchor \/>\n  <section class=\"sect-cnvtVkaA-Converter contvis-auto\" style=\"contain-intrinsic-size:800px;\">\n    <div class=\"section__interior innerA fxd-row mx-auto\">\n      <figure class=\"section__leftlane\">\n        <div class=\"hgroup-wrapper\">\n          <h3 class=\"fz-rg hdg-section mb-0.25pc\"><span>\u25bc\u30d5\u30a1\u30a4\u30eb\u3092\u30c9\u30ed\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044<\/span><\/h3>\n        <\/div><!-- \/\/\/.hgroup -->\n\n        <div class=\"chest-wrapper relatived\">\n          <div id=\"endropArea\" class=\"endrop-area\" style=\"height:17.5pc;\">\n            <div class=\"endrop-inner\">\n              <i class=\"endrop-icon\"><\/i>\n              <p class=\"endrop-text\">\u30d5\u30a1\u30a4\u30eb\u3092\u30c9\u30e9\u30c3\u30b0&amp;\u30c9\u30ed\u30c3\u30d7<\/p>\n              <small class=\"endrop-smock\">\u307e\u305f\u306f \u30af\u30ea\u30c3\u30af\u3057\u3066\u9078\u629e\uff08\u8907\u6570\u53ef\uff09<\/small>\n            <\/div>\n            <input type=\"file\" id=\"fileInput\" class=\"file-input\" multiple>\n          <\/div>\n          <ins id=\"decodedMessage\"><\/ins>\n        <\/div><!-- \/\/\/.chest -->\n\n        <!-- \u30aa\u30d7\u30b7\u30e7\u30f3 -->\n        <div class=\"colgroup w-full mt-1r\">\n          <label class=\"label is-outlined fz-sm\"><input type=\"checkbox\" class=\"checkbox\" id=\"addBomOption\">UTF-8 BOM \u3092\u4ed8\u4e0e\u3059\u308b<\/label>\n          <label class=\"label is-outlined fz-sm\">\n            <p class=\"fz-sm\">\u5909\u63db\u5143\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\uff1a<\/p>\n            <select id=\"encodingSelect\" class=\"select w-14e\">\n              <option value=\"auto\" selected>\u81ea\u52d5\u691c\u51fa<\/option>\n              <option value=\"shift_jis\">Shift_JIS<\/option>\n              <option value=\"euc-jp\">EUC-JP<\/option>\n              <option value=\"iso-2022-jp\">ISO-2022-JP\uff08JIS\uff09<\/option>\n              <option value=\"windows-1252\">Windows-1252\uff08Latin\uff09<\/option>\n            <\/select>\n          <\/label>\n        <\/div><!-- \/\/\/.colgroup -->\n      <\/figure><!-- \/\/\/.leftlane -->\n\n      <figure class=\"section__centerlane\">\n        <aside class=\"sticky-sidebar fxd-column pc-center\" style=\"height:22rem;\">\n        <\/aside>\n      <\/figure><!-- \/\/\/.centerlane -->\n\n\n      <figure class=\"section__rightlane\">\n        <div class=\"chest-wrapper relatived\">\n          <h3 class=\"fz-rg hdg-section mb-0.25pc\"><span>\u25bc\u5909\u63db\u7d50\u679c<\/span><\/h3>\n          <div id=\"resultArea\" style=\"height:17.5pc;overflow-y:auto;background:var(--color-bg-input,#f7f8f9);border:1px solid var(--color-border,#ddd);border-radius:4px;padding:0;\">\n            <div id=\"resultPlaceholder\" style=\"display:flex;align-items:center;justify-content:center;height:100%;color:var(--color-text-muted,#aaa);font-size:14px;\">\n              \u3053\u3053\u306b\u5909\u63db\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\n            <\/div>\n            <div id=\"processingList\" style=\"display:none;\"><\/div>\n          <\/div>\n          <ins id=\"encodedMessage\"><\/ins>\n        <\/div><!-- \/\/\/.chest -->\n      <\/figure><!-- \/\/\/.rightlane -->\n    <\/div><!-- \/\/\/.interior.fxd-row -->\n  <\/section>\n\n\n  <!-- \u0f3b\u00a7\ud835\udc12\ud835\udc04\ud835\udc02\ud835\udc13\ud835\udc08\ud835\udc0e\ud835\udc0d\u0f3a -->\n  <hr id=\"ch-Explanation\" anchor \/>\n  <section class=\"sect-cnvtVkaA-Explanation pt-3r contvis-auto\" style=\"contain-intrinsic-size:800px;\">\n    <div class=\"section__interior innerA mx-auto scroll-fadeIn\">\n      <div class=\"box is-broad is-solided c-base-900\">\n        <h4 class=\"hdg-explanation fz-md mb-0.25pc\">\u4f7f\u3044\u65b9<\/h4>\n        <p class=\"fz-ss mb-1r\">\n          Shift_JIS \u3084 EUC-JP \u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30c9\u30e9\u30c3\u30b0&amp;\u30c9\u30ed\u30c3\u30d7\u3059\u308b\u3060\u3051\u3067\u3001UTF-8 \u306b\u5909\u63db\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u81ea\u52d5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u62ec\u5909\u63db\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\n        <\/p>\n\n        <h5 class=\"fz-ss hdg-explanation mb-0.25pc mt-1r\">\ud83d\udca1 \u4e3b\u306a\u6a5f\u80fd<\/h5>\n        <ul class=\"fz-ss mb-1r\">\n          <li><b class=\"fw-600\">\u81ea\u52d5\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u691c\u51fa\uff1a<\/b> Shift_JIS \/ EUC-JP \/ ISO-2022-JP \u3092\u81ea\u52d5\u5224\u5225<\/li>\n          <li><b class=\"fw-600\">\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u4e00\u62ec\u5909\u63db\uff1a<\/b> \u307e\u3068\u3081\u3066\u30c9\u30ed\u30c3\u30d7\u3059\u308b\u3060\u3051\u3067\u5168\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u63db<\/li>\n          <li><b class=\"fw-600\">\u81ea\u52d5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff1a<\/b> \u5909\u63db\u5b8c\u4e86\u3068\u540c\u6642\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/li>\n          <li><b class=\"fw-600\">BOM\u4ed8\u4e0e\u30aa\u30d7\u30b7\u30e7\u30f3\uff1a<\/b> Excel\u7b49\u3067\u958b\u304f\u5834\u5408\u306b\u4fbf\u5229\u306aUTF-8 BOM\u3092\u4ed8\u4e0e\u53ef\u80fd<\/li>\n        <\/ul>\n\n        <h5 class=\"fz-ss hdg-explanation mb-0.25pc\">\ud83c\udfaf \u6d3b\u7528\u4f8b<\/h5>\n        <ul class=\"fz-ss mb-1r\">\n          <li><b class=\"fw-600\">\u30ec\u30ac\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb\u5909\u63db\uff1a<\/b> \u53e4\u3044\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u51fa\u529b\u3055\u308c\u305fShift_JIS\u30d5\u30a1\u30a4\u30eb\u3092UTF-8\u306b\u4e00\u62ec\u5909\u63db<\/li>\n          <li><b class=\"fw-600\">CSV\u30d5\u30a1\u30a4\u30eb\uff1a<\/b> Excel\u3067\u4f5c\u6210\u3055\u308c\u305fShift_JIS CSV\u3092UTF-8\u306b\u5909\u63db<\/li>\n          <li><b class=\"fw-600\">\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\uff1a<\/b> \u53e4\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306eShift_JIS\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092UTF-8\u5316<\/li>\n        <\/ul>\n\n        <h5 class=\"fz-ss hdg-explanation mb-0.25pc\">\u26a0\ufe0f \u6ce8\u610f\u4e8b\u9805<\/h5>\n        <ul class=\"fz-ss\">\n          <li><b class=\"fw-600\">\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u5c02\u7528\uff1a<\/b> \u753b\u50cf\u3084\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u4f7f\u7528\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044<\/li>\n          <li><b class=\"fw-600\">\u81ea\u52d5\u691c\u51fa\u306e\u7cbe\u5ea6\uff1a<\/b> \u307e\u308c\u306b\u8aa4\u691c\u51fa\u3059\u308b\u5834\u5408\u306f\u3001\u624b\u52d5\u3067\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044<\/li>\n          <li><b class=\"fw-600\">\u5143\u30d5\u30a1\u30a4\u30eb\u306f\u5909\u66f4\u3055\u308c\u307e\u305b\u3093\uff1a<\/b> \u5909\u63db\u6e08\u307f\u306e\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059<\/li>\n        <\/ul>\n      <\/div>\n    <\/div><!-- \/\/\/.interior -->\n  <\/section><!-- \/\/\/.section -->\n\n\n  <!-- \u0f3b\u00a7\ud835\udc12\ud835\udc04\ud835\udc02\ud835\udc13\ud835\udc08\ud835\udc0e\ud835\udc0d\u0f3a -->\n  <hr id=\"ch-Relation\" anchor \/>\n  <section class=\"sect-cnvtVkaA-Relation\" style=\"contain-intrinsic-size:1000px;\">\n    <div class=\"section__interior innerA mx-auto scroll-fadeIn\">\n      <div class=\"hgroup-wrapper mb-0.5pc\">\n        <h5 class=\"hdg-relation fz-rg\"><span>\u95a2\u9023\u30c4\u30fc\u30eb<\/span><\/h5>\n      <\/div><!-- \/\/\/.hgroup -->\n\n      <ul class=\"shelf-wrapper_pc shelfA\" data-cols_pc=\"2\">\n        <li class=\"slide\">\n          <a href=\"https:\/\/code-plus.jp\/gp\/tools\/markdown-converter\/\" class=\"linkbox\">\n            <h4 class=\"linkbox-title fz-md\">Markdown \u2192 HTML \u5909\u63db\u30c4\u30fc\u30eb<\/h4>\n            <span class=\"linkbox-excerpt\">Markdown\u8a18\u6cd5\u3092HTML\u306b\u5909\u63db\u3002\u30c6\u30fc\u30d6\u30eb\u3001\u30ea\u30b9\u30c8\u8a18\u6cd5\u3092\u30b5\u30dd\u30fc\u30c8\u3002<\/span>\n          <\/a>\n        <\/li>\n        <li class=\"slide\">\n          <a href=\"https:\/\/code-plus.jp\/gp\/tools\/dirtree-generator\/\" class=\"linkbox\">\n            <h4 class=\"linkbox-title fz-md\">DirTree Generator\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30c4\u30ea\u30fc\u751f\u6210\u30c4\u30fc\u30eb\uff09<\/h4>\n            <span class=\"linkbox-excerpt\">\u30d5\u30a9\u30eb\u30c0\u69cb\u9020\u3092\u8996\u899a\u7684\u306a\u30c4\u30ea\u30fc\u5f62\u5f0f\u3067\u81ea\u52d5\u751f\u6210\u3059\u308b\u30aa\u30f3\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3002<\/span>\n          <\/a>\n        <\/li>\n      <\/ul><!-- \/\/\/.shelf -->\n    <\/div><!-- \/\/\/.interior -->\n  <\/section><!-- \/\/\/.section -->\n\n\n  <!-- \u0f3b\u00a7\ud835\udc03\ud835\udc04\ud835\udc0f\ud835\udc00\ud835\udc11\ud835\udc13\ud835\udc0c\ud835\udc04\ud835\udc0d\ud835\udc13\u0f3a -->\n\n  <section class=\"sect-cnvtVkaA-Relation2 pt-3r contvis-auto\" style=\"contain-intrinsic-size:800px;\">\n    <div class=\"section__interior innerA mx-auto scroll-fadeIn\">\n      <div class=\"hgroup-wrapper mb-0.5pc\">\n\n      <\/div><!-- \/\/\/.hgroup -->\n\n\n    <\/div><!-- \/\/\/.interior -->\n  <\/section><!-- \/\/\/.section -->\n\n\n  <!-- \u0f3b.mediano\uff08\u4f59\u767d\u8abf\u6574\uff1apage\u4e0b\uff09\u0f3a -->\n  <hr class=\"spacer-mediano\" \/>\n\n<\/div><!-- \/\/\/\u25b2.page  -->\n\n\n<script>\ndocument.addEventListener('DOMContentLoaded', function() {\n  const endropArea = document.getElementById('endropArea');\n  const fileInput = document.getElementById('fileInput');\n  const resultArea = document.getElementById('resultArea');\n  const resultPlaceholder = document.getElementById('resultPlaceholder');\n  const processingList = document.getElementById('processingList');\n  const encodedMessage = document.getElementById('encodedMessage');\n  const encodingSelect = document.getElementById('encodingSelect');\n  const addBomOption = document.getElementById('addBomOption');\n\n  if (!endropArea) return;\n\n  fileInput.style.display = 'none';\n  endropArea.style.cursor = 'pointer';\n\n  \/\/ \u30af\u30ea\u30c3\u30af\u3067\u30d5\u30a1\u30a4\u30eb\u9078\u629e\n  endropArea.addEventListener('click', function() {\n    fileInput.click();\n  });\n\n  fileInput.addEventListener('change', function(e) {\n    if (e.target.files.length > 0) handleFiles(e.target.files);\n    fileInput.value = '';\n  });\n\n\n  \/\/ ====================================\n  \/\/ \u30c9\u30e9\u30c3\u30b0&\u30c9\u30ed\u30c3\u30d7\n  \/\/ ====================================\n\n  endropArea.addEventListener('dragover', function(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.style.backgroundColor = '#f0f0f0';\n    this.style.borderColor = '#999';\n  });\n\n  endropArea.addEventListener('dragleave', function(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.style.backgroundColor = '';\n    this.style.borderColor = '';\n  });\n\n  endropArea.addEventListener('dragenter', function(e) {\n    e.preventDefault();\n    e.stopPropagation();\n  });\n\n  endropArea.addEventListener('drop', function(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.style.backgroundColor = '';\n    this.style.borderColor = '';\n\n    if (e.dataTransfer.files.length > 0) {\n      handleFiles(e.dataTransfer.files);\n    }\n  });\n\n\n  \/\/ ====================================\n  \/\/ \u30d5\u30a1\u30a4\u30eb\u51e6\u7406\n  \/\/ ====================================\n\n  function handleFiles(files) {\n    \/\/ \u7d50\u679c\u30a8\u30ea\u30a2\u3092\u8868\u793a\n    resultPlaceholder.style.display = 'none';\n    processingList.style.display = 'block';\n    processingList.innerHTML = '';\n\n    const dropInner = endropArea.querySelector('.endrop-inner');\n    const originalContent = dropInner.innerHTML;\n    dropInner.innerHTML = '<p style=\"padding:20px;\">\u5909\u63db\u4e2d...<\/p>';\n\n    let completed = 0;\n    let errors = 0;\n    const total = files.length;\n\n    Array.from(files).forEach(function(file) {\n      const fileItem = addFileItem(file.name, 'processing');\n\n      const reader = new FileReader();\n\n      reader.onload = function(e) {\n        try {\n          const buffer = e.target.result;\n          const encoding = getEncoding(buffer);\n\n          \/\/ \u3059\u3067\u306bUTF-8\u306e\u5834\u5408\u306f\u30b9\u30ad\u30c3\u30d7\n          if (encoding === 'utf-8' || encoding === 'utf-16le' || encoding === 'utf-16be') {\n            updateFileItem(fileItem, 'skipped', encoding);\n            completed++;\n            if (completed + errors === total) {\n              showDropResult(dropInner, originalContent, completed, errors);\n              showMessage(completed + '\u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3057\u307e\u3057\u305f' + (errors > 0 ? '\uff08' + errors + '\u500b\u30a8\u30e9\u30fc\uff09' : ''), errors === 0);\n            }\n            return;\n          }\n\n          const decoder = new TextDecoder(encoding);\n          const text = decoder.decode(buffer);\n\n          \/\/ UTF-8\u3067Blob\u3092\u4f5c\u6210\n          let utf8Content;\n          if (addBomOption.checked) {\n            \/\/ BOM\u4ed8\u304d\n            utf8Content = new Blob(['\\uFEFF', text], { type: 'text\/plain;charset=utf-8' });\n          } else {\n            utf8Content = new Blob([text], { type: 'text\/plain;charset=utf-8' });\n          }\n\n          \/\/ \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\n          downloadBlob(utf8Content, file.name);\n          updateFileItem(fileItem, 'completed', encoding);\n          completed++;\n        } catch (err) {\n          console.error('\u5909\u63db\u30a8\u30e9\u30fc:', err);\n          updateFileItem(fileItem, 'error', '');\n          errors++;\n        }\n\n        \/\/ \u5168\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u5b8c\u4e86\n        if (completed + errors === total) {\n          showDropResult(dropInner, originalContent, completed, errors);\n          showMessage(completed + '\u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u63db\u3057\u307e\u3057\u305f' + (errors > 0 ? '\uff08' + errors + '\u500b\u30a8\u30e9\u30fc\uff09' : ''), errors === 0);\n        }\n      };\n\n      reader.onerror = function() {\n        updateFileItem(fileItem, 'error', '');\n        errors++;\n        if (completed + errors === total) {\n          showDropResult(dropInner, originalContent, completed, errors);\n        }\n      };\n\n      reader.readAsArrayBuffer(file);\n    });\n  }\n\n\n  \/\/ ====================================\n  \/\/ \u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u691c\u51fa\n  \/\/ ====================================\n\n  function getEncoding(buffer) {\n    const selected = encodingSelect.value;\n    if (selected !== 'auto') return selected;\n\n    return detectEncoding(buffer);\n  }\n\n  function detectEncoding(buffer) {\n    const bytes = new Uint8Array(buffer);\n\n    \/\/ BOM\u30c1\u30a7\u30c3\u30af\n    if (bytes.length >= 3 && bytes[0] === 0xEF && bytes[1] === 0xBB && bytes[2] === 0xBF) {\n      return 'utf-8';\n    }\n    if (bytes.length >= 2 && bytes[0] === 0xFF && bytes[1] === 0xFE) {\n      return 'utf-16le';\n    }\n    if (bytes.length >= 2 && bytes[0] === 0xFE && bytes[1] === 0xFF) {\n      return 'utf-16be';\n    }\n\n    \/\/ ISO-2022-JP\uff08ESC\u30b7\u30fc\u30b1\u30f3\u30b9\u691c\u51fa\uff09\n    for (let i = 0; i < bytes.length - 2; i++) {\n      if (bytes[i] === 0x1B) {\n        if ((bytes[i+1] === 0x24 && bytes[i+2] === 0x42) ||\n            (bytes[i+1] === 0x24 && bytes[i+2] === 0x40) ||\n            (bytes[i+1] === 0x28 && bytes[i+2] === 0x42)) {\n          return 'iso-2022-jp';\n        }\n      }\n    }\n\n    \/\/ UTF-8\uff08BOM\u306a\u3057\uff09\u5224\u5b9a \u2014 \u5148\u306b\u72ec\u7acb\u3057\u3066\u691c\u8a3c\n    if (isValidUtf8(bytes)) return 'utf-8';\n\n    \/\/ Shift_JIS vs EUC-JP \u5224\u5b9a\n    let sjisScore = 0;\n    let eucScore = 0;\n\n    for (let i = 0; i < bytes.length - 1; i++) {\n      const b1 = bytes[i];\n      const b2 = bytes[i + 1];\n\n      \/\/ Shift_JIS \u7b2c1\u30d0\u30a4\u30c8\u7bc4\u56f2\uff082\u30d0\u30a4\u30c8\u6587\u5b57\uff09\n      if ((b1 >= 0x81 && b1 <= 0x9F) || (b1 >= 0xE0 && b1 <= 0xEF)) {\n        if ((b2 >= 0x40 && b2 <= 0x7E) || (b2 >= 0x80 && b2 <= 0xFC)) {\n          sjisScore++;\n          i++; \/\/ 2\u30d0\u30a4\u30c8\u6d88\u8cbb\n          continue;\n        }\n      }\n\n      \/\/ EUC-JP \u7b2c1\u30d0\u30a4\u30c8\u7bc4\u56f2\uff082\u30d0\u30a4\u30c8\u6587\u5b57\uff09\u2014 \u534a\u89d2\u30ab\u30ca\u3088\u308a\u5148\u306b\u5224\u5b9a\n      if (b1 >= 0xA1 && b1 <= 0xFE) {\n        if (b2 >= 0xA1 && b2 <= 0xFE) {\n          eucScore++;\n          i++; \/\/ 2\u30d0\u30a4\u30c8\u6d88\u8cbb\n          continue;\n        }\n      }\n\n      \/\/ EUC-JP \u534a\u89d2\u30ab\u30ca (0x8E + 0xA1-0xDF)\n      if (b1 === 0x8E && b2 >= 0xA1 && b2 <= 0xDF) {\n        eucScore++;\n        i++;\n        continue;\n      }\n\n      \/\/ Shift_JIS \u534a\u89d2\u30ab\u30ca\uff08EUC\u30da\u30a2\u306b\u8a72\u5f53\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306e\u307f\uff09\n      if (b1 >= 0xA1 && b1 <= 0xDF) {\n        sjisScore++;\n        continue;\n      }\n    }\n\n    if (eucScore > sjisScore) return 'euc-jp';\n    if (sjisScore > 0) return 'shift_jis';\n\n    \/\/ \u30c7\u30d5\u30a9\u30eb\u30c8\n    return 'shift_jis';\n  }\n\n  \/\/ \u30d0\u30a4\u30c8\u5217\u304c\u6709\u52b9\u306aUTF-8\u304b\u3069\u3046\u304b\u5224\u5b9a\uff08\u975eASCII\u30d0\u30a4\u30c8\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u306e\u307f\uff09\n  function isValidUtf8(bytes) {\n    let hasMultiByte = false;\n\n    for (let i = 0; i < bytes.length; i++) {\n      const b = bytes[i];\n\n      if (b <= 0x7F) {\n        \/\/ ASCII \u2014 OK\n        continue;\n      } else if (b >= 0xC2 && b <= 0xDF) {\n        \/\/ 2\u30d0\u30a4\u30c8\u30b7\u30fc\u30b1\u30f3\u30b9\n        if (i + 1 >= bytes.length) return false;\n        if (bytes[i+1] < 0x80 || bytes[i+1] > 0xBF) return false;\n        hasMultiByte = true;\n        i += 1;\n      } else if (b >= 0xE0 && b <= 0xEF) {\n        \/\/ 3\u30d0\u30a4\u30c8\u30b7\u30fc\u30b1\u30f3\u30b9\n        if (i + 2 >= bytes.length) return false;\n        if (bytes[i+1] < 0x80 || bytes[i+1] > 0xBF) return false;\n        if (bytes[i+2] < 0x80 || bytes[i+2] > 0xBF) return false;\n        hasMultiByte = true;\n        i += 2;\n      } else if (b >= 0xF0 && b <= 0xF4) {\n        \/\/ 4\u30d0\u30a4\u30c8\u30b7\u30fc\u30b1\u30f3\u30b9\n        if (i + 3 >= bytes.length) return false;\n        if (bytes[i+1] < 0x80 || bytes[i+1] > 0xBF) return false;\n        if (bytes[i+2] < 0x80 || bytes[i+2] > 0xBF) return false;\n        if (bytes[i+3] < 0x80 || bytes[i+3] > 0xBF) return false;\n        hasMultiByte = true;\n        i += 3;\n      } else {\n        \/\/ \u4e0d\u6b63\u306a\u30d0\u30a4\u30c8\uff080x80-0xBF\u5148\u982d\u30010xC0-0xC1\u30010xF5\u4ee5\u4e0a\uff09\n        return false;\n      }\n    }\n\n    \/\/ \u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u304c1\u3064\u4ee5\u4e0a\u3042\u3063\u305f\u5834\u5408\u306e\u307fUTF-8\u3068\u5224\u5b9a\n    \/\/ \uff08ASCII\u306e\u307f\u306e\u30d5\u30a1\u30a4\u30eb\u306fShift_JIS\u3067\u3082\u554f\u984c\u306a\u3044\u306e\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u306b\u59d4\u306d\u308b\uff09\n    return hasMultiByte;\n  }\n\n\n  \/\/ ====================================\n  \/\/ UI\u95a2\u9023\n  \/\/ ====================================\n\n  function addFileItem(fileName, status) {\n    const fileItem = document.createElement('div');\n    fileItem.style.cssText = 'padding:6px 12px;border-bottom:1px solid #ecf0f1;display:flex;align-items:center;justify-content:space-between;font-size:13px;';\n    fileItem.innerHTML =\n      '<span style=\"font-weight:500;color:#333;word-break:break-all;\">' + escapeHtml(fileName) + '<\/span>' +\n      '<span class=\"file-status\" style=\"white-space:nowrap;margin-left:8px;\">\ud83d\udd52<\/span>';\n    processingList.appendChild(fileItem);\n    return fileItem;\n  }\n\n  function updateFileItem(fileItem, status, encoding) {\n    const statusEl = fileItem.querySelector('.file-status');\n    if (status === 'completed') {\n      statusEl.innerHTML = '<span style=\"color:#27ae60;\">\u2705 ' + encoding + '<\/span>';\n    } else if (status === 'skipped') {\n      statusEl.innerHTML = '<span style=\"color:#7f8c8d;\">\u23ed ' + encoding + '\uff08\u5909\u63db\u4e0d\u8981\uff09<\/span>';\n    } else if (status === 'error') {\n      statusEl.innerHTML = '<span style=\"color:#e74c3c;\">\u274c \u30a8\u30e9\u30fc<\/span>';\n    }\n  }\n\n  function showDropResult(dropInner, originalContent, completed, errors) {\n    dropInner.innerHTML =\n      '<div style=\"padding:20px;\">' +\n      '<p style=\"color: var(--c-caution, hsl(13, 99%, 43%));;font-weight:bold;\">\u5909\u63db\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\uff01<\/p>' +\n      '<small style=\"color:#666;\">' + completed + '\u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u63db' +\n      (errors > 0 ? '\uff08' + errors + '\u500b\u30a8\u30e9\u30fc\uff09' : '') +\n      '<\/small><\/div>';\n\n    setTimeout(function() {\n      dropInner.innerHTML = originalContent;\n    }, 3000);\n  }\n\n  function escapeHtml(str) {\n    return str.replace(\/&\/g, '&amp;').replace(\/<\/g, '&lt;').replace(\/>\/g, '&gt;').replace(\/\"\/g, '&quot;');\n  }\n\n\n  \/\/ ====================================\n  \/\/ \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\n  \/\/ ====================================\n\n  function downloadBlob(blob, filename) {\n    const url = URL.createObjectURL(blob);\n    const a = document.createElement('a');\n    a.href = url;\n    a.download = filename;\n    document.body.appendChild(a);\n    a.click();\n    document.body.removeChild(a);\n    URL.revokeObjectURL(url);\n  }\n\n  function showMessage(msg, isSuccess) {\n    if (!encodedMessage) return;\n\n    const cls = isSuccess ? 'is-primary' : 'is-caution';\n    const icon = isSuccess ? 'ma-check_circle' : 'ma-error';\n    const color = isSuccess ? 'primary' : 'error';\n\n    encodedMessage.innerHTML =\n      '<p class=\"alert is-ghosted ' + cls + ' mt-0.5r\">' +\n      '<i class=\"icon mas ' + icon + ' c-' + color + ' mr-0.5r\"><\/i>' +\n      '<span>' + msg + '<\/span><\/p>';\n\n    setTimeout(function() {\n      encodedMessage.innerHTML = '';\n    }, 3000);\n  }\n});\n<\/script>","protected":false},"excerpt":{"rendered":"Shift_JIS \/ EUC-JP \u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092 UTF-8 \u306b\u4e00\u62ec\u5909\u63db\u3002\u30c9\u30e9\u30c3\u30b0&amp;\u30c9\u30ed\u30c3\u30d7\u3059\u308b\u3060\u3051\u3067\u5909\u63db\u6e08\u307f\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3002","protected":false},"author":1,"featured_media":11548,"parent":173,"menu_order":34,"comment_status":"closed","ping_status":"closed","template":"templates\/page-converter.php","meta":{"_acf_changed":false,"footnotes":""},"categories":[11,16],"tags":[],"group":[],"pg":[],"class_list":["post-11509","page","type-page","status-publish","has-post-thumbnail","category-textedit","category-tool"],"acf":[],"_links":{"self":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/pages\/11509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/comments?post=11509"}],"version-history":[{"count":0,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/pages\/11509\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/pages\/173"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media\/11548"}],"wp:attachment":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media?parent=11509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/categories?post=11509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/tags?post=11509"},{"taxonomy":"group","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/group?post=11509"},{"taxonomy":"pg","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/pg?post=11509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}