!BAD!BAD field

Scotte Meredith spomacguy at gmail.com
Thu Mar 17 16:32:22 UTC 2022



> On Mar 16, 2022, at 4:56 PM, Paul Mulroney via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> 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!

Yes, it was just like that.

The odd problem was in initializing binary var as #NULL. I had put that in when trying to debug code and restepping through lines I wanted to reinitialize it. 

Thanks.

> 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
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



Scotte Meredith
spomacguy at gmail.com
509/998-0991






More information about the omnisdev-en mailing list