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

Internal.Console.Write uses unicode encoding for iOS #78974

Merged
merged 4 commits into from
Nov 30, 2022

Conversation

kotlarmilos
Copy link
Member

Fix encoding between Internal.Console.Write and SystemNative_Log for iOS to be UTF16.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Nov 29, 2022

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Fix encoding between Internal.Console.Write and SystemNative_Log for iOS to be UTF16.

Author: kotlarmilos
Assignees: kotlarmilos
Labels:

area-NativeAOT-coreclr

Milestone: -

{
fixed (char* ptr = s)
{
Interop.Sys.Log((byte*)ptr, s.Length * 2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a LogError for iOS? Because before this was called, right?

Interop.Sys.LogError(pBytes, bytes.Length);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, yes this should be Interop.Sys.LogError

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was accidentally replaced by last commit

Copy link
Member

@ivanpovazan ivanpovazan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kotlarmilos
Copy link
Member Author

MacCatalyst failure is #78778

@kotlarmilos kotlarmilos merged commit 3f163f4 into dotnet:main Nov 30, 2022
@kotlarmilos kotlarmilos deleted the encoding-mismatch branch November 30, 2022 12:53
@ghost ghost locked as resolved and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encoding between Internal.Console.Write and SystemNative_Log not aligned for iOS
5 participants