Skip to content

Commit 2db11a5

Browse files
authored
Merge pull request #628 from intersystems/commit-encoding
Fix Unicode encoding of Git commands from web UI
2 parents 659a268 + a97f823 commit 2db11a5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [2.7.1] - Unreleased
99

1010
### Fixed
11+
- Fixed improper encoding of unicode characters in commit messages (#627)
1112
- Creating a new branch now reports the error if uncommitted changes conflict (#624)
1213

1314
## [2.7.0] - 2024-11-04

cls/SourceControl/Git/WebUIDriver.cls

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,12 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
244244
}
245245
set handled = 1
246246
} elseif (pathStart = "git-command") {
247-
set requestBody = ##class(%Library.DynamicObject).%FromJSON(%request.Content)
247+
set stringBody = ""
248+
while '%request.Content.AtEnd {
249+
set stringBody = stringBody _ %request.Content.Read()
250+
}
251+
set stringBody = $zconvert(stringBody,"I","UTF8")
252+
set requestBody = ##class(%Library.DynamicObject).%FromJSON(stringBody)
248253
set command = requestBody.command
249254

250255
set gitCmd = command.%Get(0)

0 commit comments

Comments
 (0)