I'm trying to wite some extension in C. It's is intended for reading/writing id3 tags from MP3 files. But problem has raised while developing.
How can i return (for ex) Cyrillic string to TCL interpreter to be shown OK. In C code I have char* filled with my Cyrillic words.
But when i set result of command with
Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1));
unknown symbols are shown instead of correct word.
Lars H: This mostly sounds like an encoding problem. Check out http://www.tcl.tk/man/tcl8.4/TclLib/Encoding.htm . You'll probably want to use Tcl_ExternalToUtfDString and then Tcl_DStringResult.