Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding problem on Windows #154

Open
erredeco opened this issue Mar 11, 2021 · 0 comments
Open

Encoding problem on Windows #154

erredeco opened this issue Mar 11, 2021 · 0 comments

Comments

@erredeco
Copy link

Hi I have a concat task that concats a series of javascript file defined on an arrray CONFIG.JS_FILES defined like this:

'use strict';

var gulp = require('gulp');
var concat = require('gulp-concat');
var CONFIG = require('../config.js'); 
 
gulp.task('app-js', function() {
  return gulp.src(CONFIG.JS_FILES,{allowEmpty: true })
    .pipe(concat('app.js'))
    .pipe(gulp.dest(CONFIG.PATHS.destinationdir+'Assets/Js/'));
});

gulp.task('app--home-js', function() {
  return gulp.src(CONFIG.JS_HOME_FILES,{allowEmpty: true })
    .pipe(concat('app--home.js'))
    .pipe(gulp.dest(CONFIG.PATHS.destinationdir+'Assets/Js/'));
});


gulp.task('concat', gulp.series('app-js', 'app--home-js'));

The problem: some files in the array are picked up from the node_modules folder and are saved when installing them via npm i as ANSI Western European 1252 (Windows environment) while others are UTF-8 NO-BOM;

Thus the resulting file is saved as ANSI Western European 1252, so for example letters like "à" (224) become "Ã" (160)

I can't figure out how to solve this problem :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant