amblina / katacoda-scenarios

Katacoda Scenarios
https://www.katacoda.com/amblina
4 stars 8 forks source link

Tutorial 2 Step 1 - text file "may be binary" #3

Closed LeoHuckvale closed 4 years ago

LeoHuckvale commented 5 years ago

In Tutorial 2 Step 1, when trying to read ada_lovelace_bio.txt with less, I get the following message:

$ less ada_lovelace_bio.txt
"ada_lovelace_bio.txt" may be a binary file.  See it anyway?

Not sure what would be causing that, maybe some rogue escape character in the text file?

In any case this could be confusing to learners.

If Katacoda allow you to specify environment variables, you could use LESS=-f which will force less to read it? (https://superuser.com/a/772683/381552)

amblina commented 5 years ago

This is a new weirdness, I'm going to try resubmit the file because I don't have any weird characters locally but the file seems to have some weird escape characters on katacoda. There's a training session today so I'll wait till that's over before potentially breaking things 😆

Edward-Knight commented 4 years ago

The file isn't just ASCII text, but UTF-8:

$ file ada_lovelace_bio.txt
ada_lovelace_bio.txt: UTF-8 Unicode text, with very long lines

This is due to a special dash character: —. Totally valid UTF-8, but goes beyond ASCII which I guess is what less expects.

I'll swap it out of a normal ASCII hyphen minus in a PR.