https://netsuiteprofessionals.com logo
g

Gareth

05/02/2022, 4:52 AM
Hi, does SuiteScript support UTF-16BE (Big Endian) for PDF files? Currently getting errors when converting etc.
b

battk

05/02/2022, 4:52 AM
doesnt sound right, pdf is a binary format
g

Gareth

05/02/2022, 5:07 AM
Hmmm, basically have a PDF 1.4 file contents encoded as base64. So I'm trying to decode it, and write it to file. UTF_8 is only ASCII characters right? I'm unfamiliar with both
WINDOWS_1252
and
ISO_8859_1
. However, from a quick search, seems like WINDOWS_1252 might include some binary related chars?
b

battk

05/02/2022, 5:10 AM
netsuite uses base64 to represent binary files
stop trying to decode and just create the file in the file cabinet using the base64 string as the contents
g

Gareth

05/02/2022, 5:11 AM
Interesting... Cheers, I'll try that
Yays! Thank you battk
s

Shawn Talbert

05/02/2022, 4:34 PM
as a side note UTF_8 is compatible with ASCII but supports up to 4 bytes per character so it's pretty universal.