Skip to content

Commit

Permalink
Force utf-8 to fix encoding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbloom committed Jan 5, 2016
1 parent 5fabd2c commit dd44278
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func uploadFile(bucket *s3.Bucket, reader io.Reader, dest string, includeHash bo
}

log.Printf("Uploading to %s in %s (%s) [%d]\n", dest, bucket.Name, hashPrefix, caching)
err := bucket.PutReader(dest, buffer, int64(len(data)), guessContentType(dest), s3.PublicRead, s3Opts)
err := bucket.PutReader(dest, buffer, int64(len(data)), guessContentType(dest)+"; charset=utf-8", s3.PublicRead, s3Opts)
panicIf(err)

return dest
Expand Down Expand Up @@ -362,7 +362,7 @@ func deployHTML(options Options, id string, file HTMLFile) {
uploadFile(bucket, strings.NewReader(data), permPath, false, FOREVER)

log.Println("Copying", permPath, "to", curPath)
copyFile(bucket, permPath, curPath, "text/html", LIMITED)
copyFile(bucket, permPath, curPath, "text/html; charset=utf-8", LIMITED)
}

func expandFiles(root string, glob string) []string {
Expand Down

0 comments on commit dd44278

Please sign in to comment.