Sotos wrote:I've been using node.js for years by the way
For years? Well then you must be an expert in Node.js… no excuses, so here’s a simple challenge for you Sotos that should only take 5 minutes:
Write a simple function (no error-checking needed) that loads the contents of a (ASCII, ANSI, UTF8, Unicode) text file, into a string using this skeleton:
function LoadTextFile(Name){ }And once loaded replaces the following characters…
All single quotes
’ to be replaced by the ASCII
'All L-double quotes
“ to be replaced by the ASCII
"All R-double quotes
” to be replaced by the ASCII
"...and finally display the modified string with
document.write('')Here’s your little text file (Test.txt) (should be saved as Unicode) given here as a string in blue:
You don’t need Internet access to use this facility and you don’t need to upload anything to strangers because you can always use “Get” or “Set” to fix the problem, and best of all you get to retain your © copyright!