I propose to allow the py bindings to take unicode as input. I made a quick simple change which works for me, however I am relying on: * PyString_AsString: converts unicode python strings into the multi byte string format that TRE uses (i.e. the current locale), for me this works but don't know if this is standard across all platforms. * If TRE was compiled without multi byte string support my suggestion below fails, how to tackle this case? (i.e. provide two search functions or bake them together)
function: PyTrePattern_search file: tre-python.c line: 341 current: if (!PyArg_ParseTuple(args, "SO!|i:match", &pstring, &TreFuzzynessType, propose: if (!PyArg_ParseTuple(args, "UO!|i:match", &pstring, &TreFuzzynessType, The call to PyString_AsString (line 363) will then (accoding to spec) convert the Unicode into a multi byte string (using the default encoding) Regards Julien _______________________________________________ TRE-general mailing list tre-general@laurikari.net http://laurikari.net/mailman/listinfo/tre-general http://laurikari.net/tre/