The basic problem is that this file has line endings. It also isn't valid UTF-8. Together, those are going to cause
Scanner
a lot of trouble.
First, we can see exactly what's in the file using xxd
00000000: 2c2c 2c25 206f 6620 546f 7461 6c20 4578 ,,,% of Total Ex
00000010: 7065 6e64 6974 7572 652c 2c2c 0d46 756e penditure,,,.Fun
If you look, you'll see the line ending is 0d
, which is .
Scanner
needs it to be either
or
.
Next, you may run into trouble because it isn't UTF-8. All those Ê
in there are really 0xCA
, which is not a valid UTF-8 encoding. We can see that in xxd
again:
000000b0: 3939 39ca ca2c 494e 5354 5255 4354 494f 999..,INSTRUCTIO
000000c0: 4eca ca2c 2224 3234 392c 3339 372c 3232 N..,"$249,397,22
Go will probably just ship it along as bytes (and get Ê
), which is what a lot of editors try to do, but it's likely to cause trouble.
If possible, reformat this file to use either Unix or Windows line endings in UTF-8.