Skip to content

Commit

Permalink
Unicode support for CefSharp LivelyProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
rocksdanister committed Apr 26, 2024
1 parent 06ecd16 commit 8b08c31
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Lively/Lively/Core/Wallpapers/WebCefSharpProcess.cs
Expand Up @@ -80,6 +80,8 @@ public class WebCefSharpProcess : IWallpaper
RedirectStandardOutput = true,
RedirectStandardError = false,
UseShellExecute = false,
StandardInputEncoding = Encoding.UTF8,
//StandardOutputEncoding = Encoding.UTF8,
WorkingDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "plugins", "cef")
};

Expand Down Expand Up @@ -225,7 +227,11 @@ private void SendMessage(string msg)
{
try
{
// Setting process StandardInputEncoding to UTF8.
Proc?.StandardInput.WriteLine(msg);
// Or convert message to UTF8.
//byte[] bytes = Encoding.UTF8.GetBytes(msg);
//Proc.StandardInput.BaseStream.Write(bytes, 0, bytes.Length);
}
catch (Exception e)
{
Expand Down

0 comments on commit 8b08c31

Please sign in to comment.