Skip to content

Conversation

@kotlarmilos
Copy link
Member

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

@ghost
Copy link

ghost commented Nov 29, 2022

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