!BAD!BAD field

Paul Mulroney pmulroney at logicaldevelopments.com.au
Wed Mar 16 23:56:28 UTC 2022


Hi Scotte,

This usually indicates a problem with Unicode - you're trying to include unicode data where it requires UTF8. 

We had similar issues with a dot matrix printer - if we sent it pure ASCII, it was fine, but send a character field ... !BAD!BAD!BAD! ...

Reminded me of an episode of Doctor Who, "Bad Wolf" - where "Bad Wolf" started appearing everywhere!

Have a closer look at the $readfile() method.  Also, which version of Omnis are you using?  The iso-8859-1 character string only works in certain versions of Omnis, you need to use the kUniTypISO8859-1 constant elsewhere.  We had that problem when we upgraded versions of Omnis.


Regards,
Paul.


> On 17 Mar 2022, at 6:47 am, Scotte Meredith <spomacguy at gmail.com> wrote:
> 
> I have an odd problem that has popped up.
> 
> I'm putting together an email to send out using the SMTP Worker.
> 
> It properly reads the file into ibnPDF. I can view the data and it looks OK.
> 
> When I add it to the ilMimeList, the lBinData columns shows !BAD!BAD....
> 
> Earlier, it was not doing this and the email was sending out with the PDF attachment. Now it's not and I don't see the reason why.
> 
> I've tried both with lEncoding having a value and leaving it blank.
> 
> Has anyone seen this? Any ideas?
> 
> 
> Do ilMimeList.$define(lLevel,lContentType,lContentSubtype,lFilename,lCharData,lBinData,lCharset,lEncoding,lDisposition)
> 
> Do ioFileOps.$openfile(ilAttachments.path,kTrue)
> Do ioFileOps.$readfile(ibnPDF)
> Do ioFileOps.$closefile()
> Do ioMimeTypes.$getMimeTypes(lcExtension,lcType,lcSubType)
> Do ilMimeList.$add(lnLevel,lcType,lcSubType,icDocumentName,,ibnPDF,'iso-8859-1','base64')


Whiteboards are remarkable.
-- 
Paul W. Mulroney                                            We Don't Do Simple Pty Ltd 
pmulroney at logicaldevelopments.com.au       Trading as Logical Developments
www.logicaldevelopments.com.au                   ACN 161 009 374 
Ph: +61 8 9458 3889                                       86 Coolgardie Street
                                                                         BENTLEY  WA  6102




More information about the omnisdev-en mailing list