cxn03651/writeexcel — pull request #28 by maximerety (2013-12-06 16:06:30+00:00)
Title: Fix non ascii worksheet names

Using non-ascii string as worksheet names doesn't currently work (see failing tests in 7c62737).

The patch proposed in commit 9d0dc04 contains 3 changes :
* an additional `!name_utf16be` check because `is_utf8?` will return `true` for UTF-16BE strings on ruby 1.8
* an additonal `force_encoding("binary")` on ruby 1.9+ because the `/../m` regex won't work with strings with encodings
* I moved up the line `str = $~.post_match` because the content of `$~` could be changed due to the `lo =~ invalid_char` check

I hope these changes make sense to you.

Thank you for this very useful gem!