diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-01-23 13:53:57 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-01-23 13:53:57 +0000 |
commit | c0f5c2f882f9464a0a7cd12a67e9efd60201d620 (patch) | |
tree | 8cebf873b368080b7037bf33e9a08650b25c7057 | |
parent | c2296250cb7764de7e7180d945c1df8c632be345 (diff) |
lpgen.js - fixed parsing umlauts in author field
git-svn-id: http://svn.miranda-ng.org/main/trunk@3246 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | tools/lpgen/lpgen.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index 7d8102568b..4cea704c3d 100644 --- a/tools/lpgen/lpgen.js +++ b/tools/lpgen/lpgen.js @@ -517,7 +517,7 @@ array.push(";============================================================"); if (filename) array.push("; File: "+filename[1]); else array.push("; File: "+plugin+".dll"); if (pluginname) array.push("; Plugin: "+pluginname[1]); else array.push("; Plugin: "+plugin); if (MAJOR_VERSION) array.push("; Version: "+MAJOR_VERSION[1]+"."+MINOR_VERSION[1]+"."+RELEASE_NUM[1]+"."+BUILD_NUM[1]); else array.push("; Version: x.x.x.x"); -if (author) array.push("; Authors: "+author[1]); else array.push("; Authors: "); +if (author) array.push("; Authors: "+fixHexa(author[1])); else array.push("; Authors: "); //add a header end mark array.push(";============================================================"); if (description) array.push("["+description[1]+"]"); @@ -525,6 +525,13 @@ if (description) array.push("["+description[1]+"]"); versionfile_stream.Close(); } +//Replaces \x?? hexa codes with their char representation +function fixHexa(string) { + return string.replace(/\\x([a-fA-F0-9]{2})" "/g,function() { + return String.fromCharCode(parseInt(arguments[1],16)); + }); +} + //Removes duplicates, not mine, found at http://dreaminginjavascript.wordpress.com/2008/08/22/eliminating-duplicates/ function eliminateDuplicates(arr) { var i, |