From: Jan N. <jan...@gm...> - 2025-04-30 10:43:53
|
Op wo 30 apr 2025 om 09:43 schreef Jan Nijtmans: > > The following idiom I presume you are referring to, > > > > Tcl_UtfToExternalDString(NULL,...,&ds); > > CreateFileA(Tcl_Value(&ds)...); For completeness, another idiom I'm referring to: const char *str = Tcl_GetStringFromObj(....) CreateFileA(str, ...) Surprisingly many extensions use that. In 8.x it works fine, as long as the filename is restricted to ASCII. In 9.0.0/9.0.1 it works fine as long as the filename is restricted to UTF-8 ;-). With TIP #716 it works fine as long as the filename is restricted to ASCII (which is the same brokenness as 8.x ...) It's up to you how to incorporate this information in the TIP text, or - if you want - leave it out. Some examples: https://sqlite.org/src/file?name=src/tclsqlite.c&ci=ba7d5bad32ad6aac&ln=2604 https://github.com/auriocus/VecTcl/blame/master/WavReader/generic/wavreader.c (line 88) Regards, Jan Nijtmans |