Skip to content

Commit f54f0cf

Browse files
committed
fix: unable-to-change-status-to-complete-if-observations-contain-french-characters
1 parent 1fc103c commit f54f0cf

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

backend/src/main/java/com/park/utmstack/util/UnicodeReplacer.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import java.util.regex.Pattern;
55

66
public class UnicodeReplacer {
7-
// Pattern to detect Unicode sequences like \u00E9
87
private static final Pattern UNICODE_PATTERN = Pattern.compile("\\\\u([0-9A-Fa-f]{4})");
98

109
/**
@@ -15,7 +14,7 @@ public class UnicodeReplacer {
1514
*/
1615
public static String replaceUnicode(String input) {
1716
Matcher matcher = UNICODE_PATTERN.matcher(input);
18-
StringBuffer result = new StringBuffer();
17+
StringBuilder result = new StringBuilder();
1918

2019
while (matcher.find()) {
2120
// Converts the Unicode sequence to its equivalent character
@@ -27,6 +26,4 @@ public static String replaceUnicode(String input) {
2726
matcher.appendTail(result);
2827
return result.toString();
2928
}
30-
31-
}
32-
29+
}

0 commit comments

Comments
 (0)