Fix Unicode warning from #22 - squashed/rebased commits

This is @szabgab's PR #23 fixing #22 as modified by @rurban's PR #106, squashed and rebased per @karenetheridge's request on #106.