Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Change default encoding to UTF-8 for better international support #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SharpAdbClient/AdbClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class AdbClient : IAdbClient
/// <summary>
/// The default encoding
/// </summary>
public const string DefaultEncoding = "ISO-8859-1";
public const string DefaultEncoding = "UTF-8";

/// <summary>
/// The port at which the Android Debug Bridge server listens by default.
Expand Down
5 changes: 3 additions & 2 deletions SharpAdbClient/AdbSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ public virtual void SendSyncRequest(SyncCommand command, string path)
throw new ArgumentNullException(nameof(path));
}

this.SendSyncRequest(command, path.Length);

byte[] pathBytes = AdbClient.Encoding.GetBytes(path);

this.SendSyncRequest(command, pathBytes.Length);

this.Write(pathBytes);
}

Expand Down