# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #115712]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115712 >


<mtymula> here you have a guestion... why my *.pl file with utf-8
coding does not fire when i make perl6 *.pl
<mtymula> let's say it is test.pl
<mtymula> test.pl has utf-8 coding
<jnthn> mtymula: Perhaps because a handful of Windows programs seem to
think utf-8 needs a byte order mark at the start of the file. :/
<mtymula> i get ===SORRY!=== Confused at line 1, near "\ufeffuse v6;\r\n"
<jnthn> hah, yes.
<jnthn> \ufeff
<mtymula> what shall i do??
<jnthn> Get rid of the \ufeff at the start of the file.
<mtymula> come on... there is no such thing
<moritz> yes there is
<moritz> your editor just doesn't show you
<jnthn> It's in the output you pasted...and what moritz said.
<moritz> use a hex editor to confirm, if you want
<moritz> and a better text editor
<mtymula> well i use notepad ++
<jnthn> On the encoding menu select "UTF-8 without BOM"
* jnthn thought that was the default...
<mtymula> <hahaha>
<mtymula> ok
<masak> utf-8 files with a BOM has to be one of the stupidest things ever.
<FROGGS> masak: can you determine the endianess without the bom?
<masak> FROGGS: yes. see https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
<masak> I wonder why we shouldn't simply strip the BOM in Rakudo if we find it.
<masak> would make for fewer surprised first-time users.
<masak> we could even put it in the grammar, and just ignore it.
<FROGGS> I'd say that skipping is better than actually modifying some code
<masak> that's what I'm suggesting.
<masak> sorry, I have an FP background; "strip" doesn't mean "modify
original" to me :P
<jnthn> Yes, we could diddle the grammar.
<masak> *or* we could flag it up with a dedicated error message, if we
were so inclined.
<masak> just not "Confused" :(
<FROGGS> "===SORRY!=== Please remove that stupid BOM at line 1 at ..." ?
* masak submits rakudobug
<jnthn> masak: Confused is how I feel about utf-8 having a BOM :P
<masak> :P
<jnthn> I suggest we make things just work.
<masak> me too.
<mtymula> ;)
<FROGGS> DWIM++
<jnthn> Should be a one-line patch, but I'm currently writing slides
for a talk this evening :P

Reply via email to