diff --git a/pyswip/core.py b/pyswip/core.py
index <HASH>..<HASH> 100644
--- a/pyswip/core.py
+++ b/pyswip/core.py
@@ -948,6 +948,7 @@ PL_cleanup = _lib.PL_cleanup
 PL_cleanup.restype = c_int
 
 PL_unify_integer = _lib.PL_unify_integer
+PL_unify_atom_chars = _lib.PL_unify_atom_chars
 PL_unify = _lib.PL_unify
 PL_unify.restype = c_int
 
diff --git a/pyswip/easy.py b/pyswip/easy.py
index <HASH>..<HASH> 100644
--- a/pyswip/easy.py
+++ b/pyswip/easy.py
@@ -156,6 +156,7 @@ class Variable(object):
     def unify(self, value):
         if type(value) == str:
             fun = PL_unify_atom_chars
+            value = value.encode()
         elif type(value) == int:
             fun = PL_unify_integer
         elif type(value) == bool:
Updated core.py and easy.py for unifying strings properly