Invalid UTF-8 when compiling

Monkey Forums/Monkey Programming/Invalid UTF-8 when compiling

Raul(Posted 2013) [#1]
in the Console I receive this message:

TRANS monkey compiler V1.46
Parsing...
Invalid UTF-8!
Invalid UTF-8!
Invalid UTF-8!
Invalid UTF-8!
Invalid UTF-8!
Invalid UTF-8!
Invalid UTF-8!
Semanting...
Translating...
Building...
Done.


the game itself is running fine but I am wonderign what with all that Invalid message??


ziggy(Posted 2013) [#2]
Some files are saved with bad formatting. I wonder why it did never added the name of the invalid UTF-8 file tho.


Raul(Posted 2013) [#3]
ziggy,

I created back at my office a project in JungleIDE (trial version, just installed today)

At my home I did not installed it and open it in Monkey. Could this be a problem??


ziggy(Posted 2013) [#4]
I think you can safely ignore it. This is not really a serious warning.


Raul(Posted 2013) [#5]
yeah, that's what i will do :)

thanks


ziggy(Posted 2013) [#6]
if I recall properly it's related to Ansi files being sent to the compiler while it expects UTF8. As ANSI is contained in the most basic UTF8 character set you should be ok.


marksibly(Posted 2013) [#7]
In the absence of any byte order markers, monkey (C++ anyway, including trans) assumes text files are utf8 - I believe this is more or less industry practice these days...? I think it's a good thing anyway, as anything can be utf8 encoded.

The message you are seeing above indicates a 'utf8 decode failure', which is mostly probably due to the use of char codes >127 in an ascii-ish (ie: 8 bits per char, but not utf8) text file, eg: with Euro chars (accents etc) >127.

When a decode failure occurs, trans drops back to treating the data as simple '8 bit chars', so it's harmless - unless you ever accidentally string together a sequence of chars that *does* match valid utf8...


marksibly(Posted 2013) [#8]
In the absence of any byte order markers, monkey (C++ anyway, including trans) assumes text files are utf8 - I believe this is more or less industry practice these days...? I think it's a good thing anyway, as anything can be utf8 encoded.

The message you are seeing above indicates a 'utf8 decode failure', which is mostly probably due to the use of char codes >127 in an ascii-ish (ie: 8 bits per char, but not utf8) text file, eg: with Euro chars (accents etc) >127.

When a decode failure occurs, trans drops back to treating the file as simple '8 bit chars', so it's harmless - unless you ever accidentally string together a sequence of chars that *does* match valid utf8...


ziggy(Posted 2013) [#9]
@Mark, could the file name be added to the warning? It's hard to locate what files need to be properly re-saved.


marksibly(Posted 2013) [#10]
Should be able to do that...