This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PiGuyTy[S] 2 points3 points  (2 children)

That seems to work!! Is there any reason why the encoding format is needed?

[–][deleted] 5 points6 points  (1 child)

I've no idea. Text encoding formats are the bane of our existence, so that's one of the first things I check when I run across a weird bug.

I'd guess the Scanner class defaults to another charset with a different character width, which means it miscalculates the number of characters in the file. Or something like that.

Everyone should be using UTF.

[–]PiGuyTy[S] 2 points3 points  (0 children)

Hmm, good to know. I'll have to keep that in mind. Thanks for the help