timdouglas/sublime-less2css — pull request #69 by larvata (2013-08-19 05:25:05+00:00)
Title: fixed issue chinese char in path on windows

windows set non-unicode programs locale to chinese(rpc)
(system defalult coding is 'mbcs' not 'utf16')

Traceback (most recent call last):
File ".\sublime_plugin.py", line 362, in run_
File ".\less2css.py", line 45, in run
resp = l2c.convertOne(is_auto_save=True)
File ".\lesscompiler.py", line 85, in convertOne
return self.convertLess2Css(settings['lessc_command'], dirs=dirs, file=fn, minimised=settings['minimised'], outputFile=settings['output_file'])
File ".\lesscompiler.py", line 209, in convertLess2Css
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File ".\subprocess.py", line 633, in __init__
File ".\subprocess.py", line 842, in _execute_child
UnicodeEncodeError: 'ascii' codec can't encode characters in position 29-33: ordinal not in range(128)

so encode the file_path string with sys.getfilesystemencoding() is batter choice