Skip to content

Instantly share code, notes, and snippets.

@tsuchm
Created January 17, 2020 09:29
Show Gist options
  • Save tsuchm/9e6de15d2ab743326f29c61fbc6042ad to your computer and use it in GitHub Desktop.
Save tsuchm/9e6de15d2ab743326f29c61fbc6042ad to your computer and use it in GitHub Desktop.
Enforce to use bytes for MeCab even if Python3 is used
--- a/swig/MeCab.i
+++ b/swig/MeCab.i
@@ -3,6 +3,7 @@
%{
#include "mecab.h"
+#define SWIG_PYTHON_STRICT_BYTE_CHAR
/* Workaround for ruby1.9.x */
#if defined SWIGRUBY
#include "ruby/version.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment