View Full Version : copied code does not work
misterwolfy 01-19-2011, 12:53 AM I often encounter the problem that code, copied from web pages will not work properly. gives a syntax error. While if I re-type the exact same characters the script will run fine. I understand that this has something to do with UNIX line returns vs PC/Mac line returns?
The question is, is there an easy way to fix this, automatically?
Can I see the bad characters in some viewer?
What is a reliable method of posting code via html so that it will always be "clean"?
|
|
EightBit
01-19-2011, 04:44 AM
You should try to figure out exactly which characters are causing the problem. I don't use Mel much anymore, but as I recall pasting the single and/or double quotes from the web into the SE often caused an error.
Once you know the source(s) of the problem, you can paste into a text editor and search/replace the problematic characters.
If you're using Python, indentation must be consistent, again this can be fixed in a text editor.
jojanpm
01-19-2011, 07:04 AM
And in case of MEL, u might have to replace single quotes (') by back quotes (`) after copy-paste.
This is a very common issue.
greatPumpkin
01-20-2011, 09:28 AM
if you copy and paste in to a 'dumb' text editor like notepad or something that might solve your problem.
CGTalk Moderation
01-20-2011, 09:28 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.