creationix / wheat

Wheat is a blog engine for coders written in node.JS
Other
1.36k stars 134 forks source link

read file in UTF8 #28

Closed jamuhl closed 13 years ago

jamuhl commented 13 years ago

I can't write an article.markdown in utf8 (eg. german ä,ö,ü) because Git.readFile (git-fs.js: line 237) reads with 'binary' encoding.

Solution might be to pass in an optional parameter 'encoding'?

creationix commented 13 years ago

If possible, could we make it just use Buffers now. I'd rather not use the "binary" encoding for anything. I think I did it before because that was all node supported for child processes at the time.

jamuhl commented 13 years ago

Just tested removing the optional encoding in fs.readFile like you suggested. Had to convert the returned buffer to string in some places, but works. If i get the time i will fork the project and do a pull request. thanks for you help.