Fix The Bat! Wrong Cookie Character Encoding.

Recently – inspired by Benjamin Dreyer (Dreyer’s English: An Utterly Correct Guide to Clarity and Style.) – I began to apply typographical improvements Myself, whenever I can. One of many places affected by this knowledge is a quote set (“golden thoughts”) which I use within The Bat! (an e-mail app for Windows) via “cookie” feature (which You can use for random quotes within Your message template, for example). The improvement was about switching from “dummy” to “smart” quotation marks and apostrophes.

Soon after this change, however, I’ve noticed that The Bat! doesn’t handle Unicode characters incorporated well: instead of showing the proper final result (e.g. rightly encoded quotation marks), it has displayed “garbage” characters. Since I haven’t found anything helpful within the app’s settings, the only remaining idea was to experiment with character encoding on the Notepad++ side. To My content I’ve soon discovered what solves the problem: Encoding › Convert to ANSI. Works like a charm 🙂 .

6 comments Write a comment

  1. Hi,
    I am a german user of The Bat! and moderator of german BatBoard forum.

    i use The Bat! 9.x, have Templates with UTF-8 as charset and all is fine for me.

    Since The Bat! 8.x you should to use Unicode (UTF-8 with BOM) encoded text files to add a cookie with %COOKIE=”…..”
    ANSI was for older The Bat!

    Greetings from Germany
    Gwen

    • Hello Gwen, nice to hear from You 🙂 !

      Thank You for pointing this out. I’ve tried UTF-8 with BOM encoded text files, unfortunately to no avail (I get garbage text as a result) – while both files (the template and the cookie) are encoded this way. Maybe I should set something in addition within The Bat! settings, I’m not sure.

      Have a great day!
      Thomas

  2. Hello Thomas,

    Which The BaT! version do you use?

    This macro inserts with a source encoding:
    %REM 1rst Parameter is Path\Filename, 2nd the Encoding of the text file
    %COOKIE(“%MAILDIR\Cookie.txt”,”WINDOWS-1252″)

    Did you set UTF-8 as encoding for the New Message Template?

    • Thank You for Your will to figure this out.

      > Which The BaT! version do you use?

      9.0.12 32-bit Professional

      > This macro inserts with a source encoding:
      %REM 1rst Parameter is Path\Filename, 2nd the Encoding of the text file
      %COOKIE(“%MAILDIR\Cookie.txt”,”WINDOWS-1252″)

      What would You recommend me to set here instead of WINDOWS-1252?

      > Did you set UTF-8 as encoding for the New Message Template?

      Could You please help me where I can find this information? Didn’t find it in Account Properties › Templates › New Message.

      • > 9.0.12 32-bit Professional

        You should update your version to 9.0.16. See https://www.ritlabs.com/en/products/thebat/download.php

        > What would You recommend me to set here instead of WINDOWS-1252?

        I recommend UTF-8 if you had saved your Cookie file with UTF-8 encoding.

        > Could You please help me where I can find this information? Didn’t find it in Account Properties › Templates › New Message.

        Below is a section “Use character set”, you should select “Unicode (UTF-8)”.

        • First of all, I apologize for the delay – I’ve been offline around a month.

          > Below is a section “Use character set”, you should select “Unicode (UTF-8)”.

          It still doesn’t work with my older (not updated yet) version of The Bat!. I’ve tried both an UTF-8- and UTF-8-BOM-encoded cookies with UTF-8 set within a new message template. Still, the only things which works 10% is ANSI-encoded cookies.

          I guess the update You recommend could solve this.

Leave a Reply


Vivaldi