-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Certain invalid UTF-8 sequences can cause the output to fail #4086
Copy link
Copy link
Closed
Labels
Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Related to output processing (inserting text into buffer, retrieving buffer text, etc.)Area-ServerDown in the muck of API call servicing, interprocess communication, eventing, etc.Down in the muck of API call servicing, interprocess communication, eventing, etc.Issue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsPriority-2A description (P2)A description (P2)Product-ConhostFor issues in the Console codebaseFor issues in the Console codebaseResolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.Fix is checked in, but it might be 3-4 weeks until a release.
Milestone
Description
Metadata
Metadata
Assignees
Labels
Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Related to output processing (inserting text into buffer, retrieving buffer text, etc.)Area-ServerDown in the muck of API call servicing, interprocess communication, eventing, etc.Down in the muck of API call servicing, interprocess communication, eventing, etc.Issue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsPriority-2A description (P2)A description (P2)Product-ConhostFor issues in the Console codebaseFor issues in the Console codebaseResolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.Fix is checked in, but it might be 3-4 weeks until a release.
Type
Fields
No fields configured for issues without a type.
Environment
Windows build number: Version 10.0.18362.418
Windows Terminal version (if applicable): 0.7.3451.0
Steps to reproduce
printf "\xA3"Expected behavior
I'd expect to see something like the U+FFFD error character, or worst case nothing at all.
Actual behavior
The output is aborted with an error:
This looks similar to issue #3320, but PR #3380 doesn't fix it, and a recent build from master still produces the problem.
I did a bit of experimenting, and if you replace the
MB_ERR_INVALID_CHARSwith 0 in the_ParseFullRangemethod, that seems to help, although I don't know whether that's the right solution.I know there was a follow up task created which may end up fixing this (#3378), but I thought it best to have the issue filed as an actual bug. If you don't think that's necessary, though, you can always close this as a dup.