diff --git a/docs/2026-02-04/manifest-fenc.md b/docs/2026-02-04/manifest-fenc.md new file mode 100644 index 0000000..5afe037 --- /dev/null +++ b/docs/2026-02-04/manifest-fenc.md @@ -0,0 +1,3 @@ +ブックマークの同期において、`manifest.json` の `name` の値が文字化けする問題が発生しています +修正してください +なお `manifest.json` ファイルは UTF-8 エンコーディングされているものとします diff --git a/lib/github/api.ts b/lib/github/api.ts index fd8a8a6..9cd081b 100644 --- a/lib/github/api.ts +++ b/lib/github/api.ts @@ -98,7 +98,13 @@ export const fetchFileContent = async ( const data = (await response.json()) as RepoContent; if (!data.content) return null; - return atob(data.content); + // Decode base64 to binary string, then convert to Uint8Array, then decode as UTF-8 + const binaryString = atob(data.content); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + return new TextDecoder().decode(bytes); }; /**