Re: Possible problem with unicode body and attachment in 3.2.4

"'Chip' [email protected] [blat]" <[email protected]>
Newsgroups gmane.mail.blat
Message-ID <5B802AEC49CC4C5DB3D2C86FB963601D@chip>
> I have been running a .cmd script since 2010 or so that mails a Unicode
> body file and attaches another Unicode file using blat 2.6.2. (Yes, I
> know, but it works.) I decided to try 3.2.4, and the same command does
> not work. I know Chip has done a lot with Unicode in 3.x, so I probably
> don't understand what I should change on the blat command. But, maybe
> it's a bug. I collected superdebugT output for both versions and
> everything else I know into the attachment file. I hope someone can
> point me in the right direction. This happens in Windows 7 x64 (using
> stunnel to the smtp host.) I start a Unicode cmd shell with cmd /u /k.
> I created the Unicode body and attachment files for my tests using echo
> from the cmd /u shell. Blat 2.6.2 superdebugT output shows both files
> being sent. Blat 3.2.4 superdebugT output shows the first character of
> the body file is sent, and nothing else. Please let me know if I can
> provide more information, and please help :-)
>
> Cliff
> ---------- 
> A unicode body file and unicode attachment file do not seem to be handled
> properly with blat 3.2.4 on Windows 7 x64 (and goinng thru stunnel for 
> ssl.)
> The files unibody.log and uniattach.txt were creates using echo in a cmd
> window created with "cmd /u /k" so that unicode is used.
>
> >hexdump unibody.log
> 00000000: 77 00 72 00 69 00 74 00 - 65 00 20 00 74 00 6f 00 w.r.i.t. 
> e...t.o.
> 00000010: 20 00 6c 00 6f 00 67 00 - 66 00 69 00 6c 00 65 00 ..l.o.g. 
> f.i.l.e.
> 00000020: 2e 00 0d 00 0a 00 00                              .......
> >hexdump uniattach.txt
> 00000000: 77 00 72 00 69 00 74 00 - 65 00 20 00 74 00 6f 00 w.r.i.t. 
> e...t.o.
> 00000010: 20 00 6f 00 75 00 74 00 - 66 00 69 00 6c 00 65 00 ..o.u.t. 
> f.i.l.e.
> 00000020: 2e 00 0d 00 0a 00 00                              .......
>
> From within the same cmd /u /k I email the files using blat 2.6.2 which 
> works
> (the superdebug output looks good and I receive the body and attachment in 
> my
> mailer client), and with blat 3.2.4 which does not work as shown below in 
> the
> superdebugT output for both.

<snipped>

Ok, this was enough for me to check Blat sources.

Although your two files look to be Unicode, and they might actually be, they 
do not have the Unicode Byte Order Marker (BOM) in the first bytes that tell 
any Unicode reader program how to interpret the data contained within.  It 
is the BOM that Blat was looking for to make the determination that your 
files are in fact Unicode.

I made a small change to Blat to look for your file conditions, and there 
might be other users with similar issues, and to strip out the binary zeroes 
if the entire file is made up of 8-bit data.

I will try to get an update posted in the next few days.  If you want an 
executable earlier, please drop me a note.

Chip
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.