I have this B4J code
Im looking to replicate this in C# with the code below, however the output files are not the same (ie different file length)
Im not sure if this is a signed vs unsigned bytes issue or an encoding issue.
Any ideas what the problem could be?
B4X:
Dim b As ByteConverter
Dim Bytes() As Byte = File.ReadBytes("D:\Temp","somefile.zip")
Dim sfb As String = b.StringFromBytes(Bytes,"UTF-8")
File.WriteString("D:\Temp","test_b4j.txt",sfb)
Im looking to replicate this in C# with the code below, however the output files are not the same (ie different file length)
C#:
byte[] bytes = File.ReadAllBytes("D:\Temp\somefile.zip");
string result = Encoding.UTF8.GetString(bytes);
File.WriteAllText("D:\Temp\test_c#.txt", result);
Im not sure if this is a signed vs unsigned bytes issue or an encoding issue.
Any ideas what the problem could be?