Skip to content

Commit

Permalink
fix utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
esrrhs committed Apr 23, 2024
1 parent 5abca13 commit c734adc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/plua.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func showpprof(filedata *FileData, filename string) {
name := strings.Replace(str, "<", "'", -1)
name = strings.Replace(name, ">", "'", -1)
name = strings.Replace(name, "\"", "\\\"", -1)
name = strings.ToValidUTF8(name, "?")
tmp := fmt.Sprintf("0x%016x %s\n", id+0xFF000000, name)
output = append(output, []byte(tmp)...)
}
Expand Down

0 comments on commit c734adc

Please sign in to comment.