From 4282d017bcbf520831ceb2916817f6cb91820a27 Mon Sep 17 00:00:00 2001 From: Bela VanderVoort Date: Fri, 19 Apr 2024 09:58:07 -0500 Subject: [PATCH] Fix encoding issue with unicode + csharpier 0.28+ (#1233) closes #1232 --- Src/CSharpier.Rider/CHANGELOG.md | 3 +++ Src/CSharpier.Rider/gradle.properties | 2 +- .../java/com/intellij/csharpier/CSharpierProcessServer.java | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Src/CSharpier.Rider/CHANGELOG.md b/Src/CSharpier.Rider/CHANGELOG.md index 90bfd1067..f9b1511de 100644 --- a/Src/CSharpier.Rider/CHANGELOG.md +++ b/Src/CSharpier.Rider/CHANGELOG.md @@ -2,6 +2,9 @@ # csharpier-rider Changelog +## [1.7.1] +- Fix unicode issue with csharpier 0.28.0+ + ## [1.7.0] - Fix deprecated function warning - Use CSharpier Http Server for 0.28.0+ diff --git a/Src/CSharpier.Rider/gradle.properties b/Src/CSharpier.Rider/gradle.properties index 6434ea796..e8b0da491 100644 --- a/Src/CSharpier.Rider/gradle.properties +++ b/Src/CSharpier.Rider/gradle.properties @@ -3,7 +3,7 @@ pluginGroup = com.intellij.csharpier pluginName = csharpier -pluginVersion = 1.7.0 +pluginVersion = 1.7.1 # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. diff --git a/Src/CSharpier.Rider/src/main/java/com/intellij/csharpier/CSharpierProcessServer.java b/Src/CSharpier.Rider/src/main/java/com/intellij/csharpier/CSharpierProcessServer.java index 0617c3ca9..05003df5a 100644 --- a/Src/CSharpier.Rider/src/main/java/com/intellij/csharpier/CSharpierProcessServer.java +++ b/Src/CSharpier.Rider/src/main/java/com/intellij/csharpier/CSharpierProcessServer.java @@ -111,7 +111,7 @@ public FormatFileResult formatFile(FormatFileParameter parameter) { return null; } - InputStreamReader reader = new InputStreamReader(connection.getInputStream()); + InputStreamReader reader = new InputStreamReader(connection.getInputStream(), "UTF-8"); var result = gson.fromJson(reader, FormatFileResult.class); reader.close();