Skip to content

Commit

Permalink
Fix Encode Issues (#328)
Browse files Browse the repository at this point in the history
`Set-GitHubContent` needed to use the `UTF8` encoder, just like `Get-GitHubContent`, as opposed to the `Unicode` encoder.
  • Loading branch information
jing8956 authored May 11, 2021
1 parent 0023635 commit 1200b5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GitHubContents.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ filter Set-GitHubContent

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

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

$hashBody = @{
message = $CommitMessage
Expand Down

0 comments on commit 1200b5b

Please sign in to comment.