Closed ceoaliongroo closed 10 years ago
I did created a script in grunt to rename names.
In my object collection the original filename is:
0D0001E2-9AB0-C8D7-D1E8-4F264F3492E3/Adrichem - el Templo de Solomón.jpg
But when i use grunt-contrib-copy .. to read the src encoded the result is
0D0001E2-9AB0-C8D7-D1E8-4F264F3492E3/Adrichem - el Templo de Soloḿn.jpg
Why?
Thanks
This is the code:
cdl: { files: [{ expand: true, dot: true, cwd: 'brain/files', src: '**/*.{jpg,JPG,png,PNG,gif,jpeg,webp,tiff,mp3,wav,avi,mp4}', dest: '<%= yeoman.app %>/pages', rename: function(dest, src) { var attachments = grunt.config.get('CDL.attachments'), newFilename; grunt.log.writeln(['filename:', he.encode(src) ]); if (typeof attachments[src] !== 'undefined') { newFilename = attachments[src].guid + attachments[src].format; grunt.log.writeln([newFilename, src.split('/')[1], dest + src.replace(src.split('/')[1], newFilename)]); return dest + '/' + src.replace(src.split('/')[1], newFilename); } return dest + '/' + src; } }]
he uses numerical escapes of the form પ (hexadecimal digits) rather than Ӓ (decimal digits). Hence the difference.
પ
Ӓ
I did created a script in grunt to rename names.
In my object collection the original filename is:
But when i use grunt-contrib-copy .. to read the src encoded the result is
Why?
Thanks
This is the code: