Skip to content

Commit 51e72de

Browse files
committed
fix #220
1 parent 552199f commit 51e72de

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

R/ISOAbstractObject.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,11 +1160,7 @@ ISOAbstractObject <- R6Class("ISOAbstractObject",
11601160
xml <- self$encode(...)
11611161
xml_str <- as(xml, "character")
11621162
#write file with writeBin to overcome writeChar size limitation
1163-
writeBin(xml_str, con = file, useBytes = TRUE)
1164-
#read file to replace C-style zero-terminated string
1165-
r = readBin(file, raw(), file.info(file)$size)
1166-
r[r==as.raw(0)] = as.raw(0x20) ## replace with 0x20 = <space>
1167-
writeBin(r, file)
1163+
writeBin(charToRaw(xml_str), con = file)
11681164
},
11691165

11701166
#Util & internal methods

0 commit comments

Comments
 (0)