Skip to content

[SR-13807] Use UTF-8 on Windows #56204

@swift-ci

Description

@swift-ci
Previous ID SR-13807
Radar None
Original Reporter svanimpe (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

29/10 snapshot on Windows

Additional Detail from JIRA
Votes 1
Component/s Standard Library
Labels Bug, Windows
Assignee @compnerd
Priority Medium

md5: 206fbad8245b125d62b0d21d1914e7ff

Issue Description:

Whenever I run a Swift app on Windows, I first have to set the correct code page in my terminal with chcp 65001, or add the following to my app:

import WinSDK
_ = SetConsoleOutputCP(UINT(CP_UTF8))

Is there a way to do this by default? @compnerd suggested doing it in the runtime.

Metadata

Metadata

Assignees

Labels

WindowsPlatform: WindowsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrella

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions