Skip to content

Commit

Permalink
only ASCII or UTF16 should be used in binary plist
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Zinenko committed Apr 20, 2017
1 parent 795cf23 commit f2967fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bplist_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (p *bplistGenerator) writeDataTag(data []byte) {

func (p *bplistGenerator) writeStringTag(str string) {
for _, r := range str {
if r > 0xFF {
if r > 0x7F {
utf16Runes := utf16.Encode([]rune(str))
p.writeCountedTag(bpTagUTF16String, uint64(len(utf16Runes)))
binary.Write(p.writer, binary.BigEndian, utf16Runes)
Expand Down

0 comments on commit f2967fc

Please sign in to comment.