in reply to Re: perltidy and UTF-8 BOM
in thread perltidy and UTF-8 BOM

A good question!!! I have found in the past when transferring the same text file--encoded with UTF-8--between different editors, unless it had a BOM then a corrupted display of the non-ASCII characters would occur. I encountered this especially between either 'EditPad Pro' or the newer versions of 'Notepad' and 'Programmer's File Editor'. The latter is now a very old but in its day extremely handy text editor which I used for the majority of the 2000's. I also had issues with non-BOM unicode text and the free version of 'Take Command Console' which I use exclusively instead of the native console in Windows. This is a generally excellent 'DOS' replacement but it does not support UTF-8--so again without a BOM I found weird things happened and the last time I spoke to the chap who writes TCC he was pretty militant about only offering UTF-16 output from his console commands. So just as a carte blanche fix I applied a BOM to all unicoded files whether UTF-8 or UTF-16 and never considered it again. These days I use EPP for all my editing so probably could live without it, but there would be a lot of files to re-edit and remove the BOM from! Even then I'd still run in to issues with TCC however as I also launch the Perl runtime and debugger through it. At the end of the day, as you say UTF-8 shouldn't need a BOM but I have found--other than perltidy!!!--that employing one helps more than it hinders.

I will try that idea of stripping and then reapplying the BOM.

As an aside: I am afraid I do not know how to quote and reply to individual posts in this forum system so I am having to do so en masse. My apologies if this appears somewhat confusing because of it.

"Aure Entuluva!" - Hurin Thalion at the Nirnaeth Arnoediad.

Replies are listed 'Best First'.
Re^3: perltidy and UTF-8 BOM
by haukex (Bishop) on May 21, 2018 at 13:19 UTC
    I am afraid I do not know how to quote and reply to individual posts in this forum system so I am having to do so en masse.

    In the thread view, every post has a [reply] link in the bottom right corner of the post.

    In the individual view, there's the Comment on link underneath the post. (Update: Tux pointed out that this link could also be above the post, thanks!)

      vvv here vvv or here --->
Re^3: perltidy and UTF-8 BOM
by AnomalousMonk (Bishop) on May 21, 2018 at 13:55 UTC
    ... how to quote ...

    I'm not sure this is what you're referring to, but there is a  <blockquote> ... quoted text ... </blockquote> tag that this site supports; see Markup in the Monastery and Writeup Formatting Tips. (Many monks, including myself, embed italics tags within the blockquote tags to further distinguish the quote. The end result is then <blockquote><i> ... </i></blockquote>.)

    Give a man a fish:  <%-{-{-{-<