Problem:
I have a challenge for you. You will find at the end of thispost a link to a zip that contains a .NET 4.0 projects. The challenge is tomake this project to compile and give me the cause of the problem. I will letyou until Friday morning.
I have a challenge for you. You will find at the end of thispost a link to a zip that contains a .NET 4.0 projects. The challenge is tomake this project to compile and give me the cause of the problem. I will letyou until Friday morning.
Good luck.
https://skydrive.live.com/redir?resid=BB7D9F52E4FDB024!259&authkey=!APfTPi6HWX0VJQg
Solution:
In the ‘class’ word from the Foo class we had an odd character for Unicode world. The character named is ‘Zero with space’. Is like a space between words but without a visible space (width). Because Visual Studio can process also Unicode files, we have no limitation to add Unicode characters that are not visible using a normal editor. If we open the file with Total Commander viewer for example we will be able to see the character (in hex view for example).
Nice job :-)
Solution:
In the ‘class’ word from the Foo class we had an odd character for Unicode world. The character named is ‘Zero with space’. Is like a space between words but without a visible space (width). Because Visual Studio can process also Unicode files, we have no limitation to add Unicode characters that are not visible using a normal editor. If we open the file with Total Commander viewer for example we will be able to see the character (in hex view for example).
Nice job :-)
Hehe, simple one.
ReplyDeleteWhen in doubt, retype the text. The problem is with the keyword "class". For example, if you put the cursor at the end of "class", and press CTRL+Left (that is, jump over one word), it will jump INSIDE the class, after the 'l' char.
Looking at the source with a HEX Viewer we see:
cl​ass . That is the ANSI representation. There is some UTF-8 garbage in there :)
You are almost there. You need to tell me what is that character? What represents?
DeleteU+200B
DeleteUnicode line break:
http://www.fileformat.info/info/unicode/char/200b/index.htm
Probably from some weird editor/another operating system
Nice - the file is UTF-16 encoded (big endian), that is ok.. Word has the habit to insert zero-width-spaces sometimes.. :)
DeleteI think that the file is encoded in ANSI and the "a" character in "class" is "â" which isn't a latin character. The ANSI encoded file permits to use characters from other alphabets not only latins character.
ReplyDeleteI added the solution to the post. Enjoy.
ReplyDelete