Tcl Source Code

View Ticket
Login
Ticket UUID: 0b9332722ad7a3c1aa4d15902080333db8dda294
Title: Support utf-8 on Windows console
Type: Patch Version: 8.6
Submitter: anonymous Created on: 2020-01-11 21:18:07
Subsystem: 52. Portability Support Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2020-01-13 14:50:53
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2020-01-13 14:50:53
Description:

When UTF-8 feature is enabled in Windows, the console reports code page 65001. This is an official code page value with constant CP_UTF8, but this code page is not recognised by Tcl. Tcl tries to initialize encoding cp65001, but this fails, so iso8859-1 is used instead. Easiest fix is to initialize the encoding to utf-8 instead of cp65001.

User Comments: jan.nijtmans added on 2020-01-13 14:50:53:
Thanks for the report and the patch! Looks fully reasonable.

Applied now to core-8-6-branch and up.

Attachments: