cognitom / gulp-slim

Slim plugin for gulp
https://www.npmjs.org/package/gulp-slim
MIT License
44 stars 14 forks source link

UTF-8 issue #32

Closed yozzh closed 9 years ago

yozzh commented 9 years ago

When i try to compile slim template with russian symbols it returns me an error:

Encoding::InvalidByteSequenceError: "\xD8" on US-ASCII

So i add this option to spawn object in your module function:

program = spawn(cmnd, arg);

changed to

program = spawn(cmnd, args, {
        env: {
          "LC_CTYPE":"ru_RU.UTF-8"
        }
      });

and it will work OK! Can you fix it or help me to avoid this issue?

cognitom commented 9 years ago

Pls send us your PR :) Thanks!

yozzh commented 9 years ago

PR has been created.

coobstar commented 9 years ago

Hows the scene on this one? We are also running into encoding issues

yozzh commented 9 years ago

@coobstar I send a pull request about 20 days ago :) if you need the correct solution - i can send you compiled js library to use it in your project. Or you can get it by yourself from my project https://github.com/fishtag/gulpify/blob/master/gulp/scripts/slim.js

cognitom commented 9 years ago

Oops, sorry. I'm back. I've merged the PR into the master. Thank you so much, @yozzh!