{"id":8287,"date":"2020-07-14T09:28:59","date_gmt":"2020-07-14T16:28:59","guid":{"rendered":"https:\/\/minisoft.com\/support\/?p=8287"},"modified":"2020-07-14T09:39:00","modified_gmt":"2020-07-14T16:39:00","slug":"uploading-pdf-files-that-require-binary-encoding-to-a-web-service","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/uploading-pdf-files-that-require-binary-encoding-to-a-web-service\/","title":{"rendered":"Uploading PDF files that require binary encoding to a web service (character sets)"},"content":{"rendered":"\n<p>The attachment of PDFs, JPGs and other file types through a web service call can be challenging, because character sets vary depending on the usage. Whitespace, non-printable ASCII data, line endings, tabs and other special characters can cause problems if the correct character set is not selected.<\/p>\n\n\n\n<p>The binary encoding type is one solution to the issues noted above. Binary encoding is a bit-for-bit copy of the data that is useful for transferring non-text files like PDFs, JPGs and other file types. The character set to choose for binary encoding with eFORMz is ISO-8859-1.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"401\" height=\"193\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2020\/07\/ISO.png\" alt=\"\" class=\"wp-image-8288\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/ISO.png 401w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/ISO-300x144.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/ISO-150x72.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/ISO-250x120.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/ISO-374x180.png 374w\" sizes=\"(max-width: 401px) 100vw, 401px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Character sets<\/h2>\n\n\n\n<p>A character set is a table for mapping of the expected result to a position. For example \u2018A\u2019 is 64 in most tables and \u2018B\u2019 is 65. The first 128 positions are the same for most tables. <a href=\"\/support\/index.php\/converting-scsa-or-scsz-from-ebcdic-into-unicode\/\">EBCDIC<\/a> is a notable and frequent exception. As most tables hold 256 positions (8-bit), the upper characters (128-255) will vary depending on use.<\/p>\n\n\n\n<ul><li>eFORMz default character set is ROMAN8. This is the classic character set used by HP LaserJet printers.<\/li><li>ISO-8859-1 is one for one and useful when handling binary data such as PDF files.<\/li><li>PC-850 is used by Zebra printers and has a few odd characters in the lower half (0-127)<\/li><li><a href=\"\/support\/index.php\/unicode-characters\/\">UNICODE<\/a> uses a 32-bit (4,294,967,295) position table.<\/li><li>UTF-8 can represent almost as many characters as UNICODE but does do with 8-bit, 24-bit, and 32-bit depending on table sub-section.<\/li><li>Windows is an 8-bit (256 position) table with character mapping to Microsoft standards.<\/li><\/ul>\n\n\n\n<p>Tags: Character set, EBCDIC, ISO-8859-1, PC-850, UNICODE, UTF-8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The attachment of PDFs, JPGs and other file types through a web service call can be challenging, because character sets vary depending on the usage. Whitespace, non-printable ASCII data, line endings, tabs and other special characters can cause problems if the correct character set is not selected. The binary encoding type is one solution to [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,454],"tags":[621,524,622,623,9,341],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8287"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=8287"}],"version-history":[{"count":4,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8287\/revisions"}],"predecessor-version":[{"id":8292,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8287\/revisions\/8292"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=8287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=8287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=8287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}