Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unreadable non-UTF-8 output on localized MSVC #110586

Merged
merged 2 commits into from
Apr 30, 2023

Conversation

ChrisDenton
Copy link
Member

Fixes #35785 by converting non UTF-8 linker output to Unicode using the OEM code page.

Before:

  = note: Non-UTF-8 output: LINK : fatal error LNK1181: cannot open input file \'m\x84rchenhaft.obj\'\r\n

After:

   = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj'

The difference is more dramatic if using a non-ascii language pack for Windows.

@rustbot
Copy link
Collaborator

rustbot commented Apr 20, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 20, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 20, 2023

These commits modify the Cargo.lock file. Random changes to Cargo.lock can be introduced when switching branches and rebasing PRs.
This was probably unintentional and should be reverted before this PR is merged.

If this was intentional then you can ignore this comment.

@rust-log-analyzer

This comment has been minimized.

@ChrisDenton
Copy link
Member Author

ChrisDenton commented Apr 20, 2023

Ok, I'm not entirely sure which directory the tests should fit in but I tried to find something related.

@compiler-errors
Copy link
Member

Sorry for the late response. The changes look good to me, but @ChrisDenton do you have anyone in mind who may be able to give this a more ... windows-specific review?

@ChrisDenton
Copy link
Member Author

Ah, this is often an issue 🙂. I know @klensy has helped in reviewing Windows bits in the past (but no pressure). Otherwise I'll see if I can find a random libs reviewer willing to wade in.

@workingjubilee
Copy link
Member

It's not really about Windows, to be honest, it's about the horrors of text encoding. Windows is just the crime scene, not the crime.

@rust-log-analyzer

This comment has been minimized.

Fixes rust-lang#35785 by converting non UTF-8 linker output to Unicode using the OEM code page.

Before:

```text
  = note: Non-UTF-8 output: LINK : fatal error LNK1181: cannot open input file \'m\x84rchenhaft.obj\'\r\n
```

After:

```text
   = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj'

```

The difference is more dramatic if using a non-ascii language pack for Visual Studio.
@workingjubilee
Copy link
Member

Okay, this looks much better, it fits with my understanding of the Windows codepages, and I can see that the control flow looks correct, now! Since compiler-errors is also onboard,

@bors r+

@bors
Copy link
Contributor

bors commented Apr 29, 2023

📌 Commit 9b9d39e has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#110586 (Fix Unreadable non-UTF-8 output on localized MSVC)
 - rust-lang#110652 (Add test for warning-free builds of `core` under `no_global_oom_handling`)
 - rust-lang#110973 (improve error notes for packed struct reference diagnostic)
 - rust-lang#110981 (Move most rustdoc-ui tests into subdirectories)
 - rust-lang#110983 (rustdoc: Get `repr` information through `AdtDef` for foreign items)
 - rust-lang#110984 (Do not resolve anonymous lifetimes in consts to be static.)
 - rust-lang#110997 (Improve internal field comments on `slice::Iter(Mut)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 734e866 into rust-lang:master Apr 30, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 30, 2023
@ChrisDenton ChrisDenton deleted the msvc-oem-output branch April 30, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unreadable non-UTF-8 output on localized MSVC
6 participants