* Internal.Console.Write uses UTF16 encoding for IsiOSLike
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Text;
+
+namespace Internal
+{
+ public static partial class Console
+ {
+ public static unsafe void Write(string s)
+ {
+ fixed (char* ptr = s)
+ {
+ Interop.Sys.Log((byte*)ptr, s.Length * 2);
+ }
+ }
+ public static partial class Error
+ {
+ public static unsafe void Write(string s)
+ {
+ fixed (char* ptr = s)
+ {
+ Interop.Sys.LogError((byte*)ptr, s.Length * 2);
+ }
+ }
+ }
+ }
+}
<Compile Include="$(CommonPath)System\IO\PathInternal.Unix.cs">
<Link>Common\System\IO\PathInternal.Unix.cs</Link>
</Compile>
- <Compile Include="$(MSBuildThisFileDirectory)Internal\Console.Unix.cs" Condition="'$(TargetsAndroid)' != 'true'" />
+ <Compile Include="$(MSBuildThisFileDirectory)Internal\Console.Unix.cs" Condition="'$(TargetsAndroid)' != 'true' and '$(IsiOSLike)' != 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)Internal\Console.Android.cs" Condition="'$(TargetsAndroid)' == 'true'" />
+ <Compile Include="$(MSBuildThisFileDirectory)Internal\Console.iOS.cs" Condition="'$(IsiOSLike)' == 'true'" />
<Compile Include="$(CommonPath)Interop\Android\Interop.Logcat.cs" Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">
<Link>Common\Interop\Android\Interop.Logcat.cs</Link>
</Compile>