Skip to content

Commit 1200b5b

Browse files
authored
Fix Encode Issues (#328)
`Set-GitHubContent` needed to use the `UTF8` encoder, just like `Get-GitHubContent`, as opposed to the `Unicode` encoder.
1 parent 0023635 commit 1200b5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GitHubContents.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ filter Set-GitHubContent
358358

359359
$uriFragment = "/repos/$OwnerName/$RepositoryName/contents/$Path"
360360

361-
$encodedContent = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($Content))
361+
$encodedContent = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($Content))
362362

363363
$hashBody = @{
364364
message = $CommitMessage

0 commit comments

Comments
 (0)