simondlr/dat-Git-Music-Hook — pull request #1 by lextoumbourou (2014-11-17 01:41:58+00:00)
Title: Ensure hook doesn't break when it encounters char outside of ASCII

Hi @simondlr,

Been listening to Jhené Aiko's album today and noticing that my commits are failing when using your hook:

```
> git commit -am "Hello world"
'ascii' codec can't encode character u'\xe9' in position 32: ordinal not in range(128)
Aborting commit due to empty commit message.
```

So this PR will ensure that the message is encoded in 'utf-8' at hook's [edges](http://nedbatchelder.com/text/unipain/unipain.html#35). I've also cleaned up the format string, so it's super clear that we're working with unicode in the script and bytes at the edges.

```
> git commit -am "Hello world"
[master 960f9d2] Hello world - Listened to: Jhené Aiko - Comfort Inn Ending (Freestyle)
1 file changed, 1 insertion(+)
```

Lemme know what you think.