microsoft / microsoft/vscode-cpptools

Add tests for each file encoding supported by VS Code

Open
#13,178 0 comments 0 reactions 1 assignee View on GitHub

@Colengms is already working on this.

Since Sep 9, 2026.

internal Language Service world ready
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

When a file is open in the editor, VS Code decodes it and provide extensions with UTF-8 content. When a header is read directly from disk, cpptools must do the decoding.

While investigating an issue with GB2312, I discovered that the encoding "EUC-CN" from iconv (GB2313 v. A1A4?) is not the same version used by VS Code itself (v. A1AA?) for that encoding. (See: https://en.wikipedia.org/wiki/GB_2312 , "Two implementations of GB2312"). Since both use iconv, I assume VS Code is using the "GBK" encoding for both GBK and GB2312 (as GB2313 is a subset of GBK).

I'm concerned that other encodings we support may have similar nuances. Opening this issue to track adding tests that exercise cpptools decoding, for all file encodings supported by VS Code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.