Sign In Register

How can we help you today?

Start a new topic

Unity docs (probably other) code snippets are Unicode, disallowing you to copy+paste without seeing errors

Not sure why it's in Unicode for copy+paste:

For example:

AuthenticationResponse authResponse = new AuthenticationRequest ().SetUserName ("gabriel").SetPassword ("password").Send ();

if (authResponse.HasErrors) {

    //It didn't work

} else {

    //It worked!!


^ The snippet above at the link above is unicode, making Visual Studio scream.

Hi Dylan,

What error are you getting here exactly ? 



"Some unicode characters in this file could not be saved in the current codepage. Do you want to resave this file as Unicode in order to maintain all your data?"

Only when copy+pasting from the docs on that page, so far. When you paste, you get TONS of errors that don't seem possible. I was pulling my hair out until I tried saving to see if it would let me, and that's when I discovered.. it's unicode, causing all sorts of problems.

If I paste as plaintext, it's still unicode. If I type it out myself instead of copy+paste, the same code works perfectly (non-unicode).

Login to post a comment