microsoft / microsoft/vscode

[macOS IME] Typing decimal numbers may produce "1。2" instead of "1.2"

Open
#325,744 2 comments 0 reactions 1 assignee Claimed by @aiday-mar View on GitHub
editor-input-IME
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Bug Description

When using a Chinese input method on macOS, VS Code sometimes converts the ASCII period character (.) into the Chinese full-width period (。).

Example:

Input:

1.2

Actual output:

1。2

Expected output:

1.2

The issue affects normal text editing as well as the integrated terminal.

Environment

OS:

macOS Darwin 25.5.0
Architecture: arm64

VS Code Stable (affected)

Version:

1.128.0

Electron:

42.5.0

Chromium:

148.0.7778.271

The issue was also reproduced with:

VS Code 1.127.0
Electron 42.2.0

VS Code Insiders (not affected)

Version:

1.129.0-insider

Electron:

42.6.0

Chromium:

148.0.7778.280

The issue does not reproduce in VS Code Insiders.

Steps to Reproduce

1. Open VS Code on macOS.
2. Switch to a Chinese input method.
3. Type:

1.2

4. Observe that the output may become:

1。2

Additional Investigation

The issue was tested with:

* Multiple Chinese input methods.
* Different file types (.md, .txt).
* All extensions disabled.
* A clean VS Code user data directory:

--user-data-dir ~/vscode-clean-test

* Removing existing VS Code user data:

~/Library/Application Support/Code

The issue still reproduces.

The issue is not observed in:

* Web browsers.
* Microsoft Word.
* TextEdit.
* Other Electron applications tested.

Relation to Existing IME Issues

This may be related to macOS IME composition handling.

For example, #320525 fixes a terminal-specific IME composition issue involving xterm.js.

However, this issue appears different:

* The problem also reproduces in VS Code text editors (.md, .txt).
* The symptom is not duplicated input.
* The symptom is incorrect conversion of ASCII period (.) into Chinese full-width punctuation (。).

Additional Notes

The behavior appears to depend on the VS Code/Electron version.

Observed:

VS Code 1.127.0
Electron 42.2.0
Affected
VS Code 1.128.0
Electron 42.5.0
Affected
VS Code 1.129.0-insider
Electron 42.6.0
Not affected

This suggests a possible regression or fix related to IME composition event handling.

Expected Behavior

When typing decimal numbers with a Chinese input method, ASCII periods should remain unchanged:

1.2

should not become:

1。2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.