From: SourceForge.net <no...@so...> - 2011-10-10 13:54:11
|
Bugs item #3163893, was opened at 2011-01-22 13:27 Message generated for change (Settings changed) made by thomasmenez You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3163893&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 36. [tk_chooseDirectory] Group: obsolete: 8.6b1.1 >Status: Pending Resolution: Fixed Priority: 9 Private: No Submitted By: Thomas MENEZ (thomasmenez) Assigned to: Jan Nijtmans (nijtmans) Summary: -initialdir option bug for tk_chooseDirectory under XP Initial Comment: How to reproduce : 1- test under XP 2- Pull CVS HEAD as of 22 January 2011. 3- Start wish 4- Type : tk_chooseDirectory -initialdir c:\ => the dialog does not open in c:\. 5- Recompile wish with -DUNICODE -D_UNICODE removed (you have to tweak the tk generated makefile) 6- Type : tk_chooseDirectory -initialdir c:\ => the dialog correctly opens in c:\. It was working OK in august 2010. -DUNICODE has been added later, and Win32 API calls also have been modified in tkWinDialog.c. Note : this bug might not be reproducible under Vista / 7. ---------------------------------------------------------------------- Comment By: Thomas MENEZ (thomasmenez) Date: 2011-10-10 15:27 Message: Should we consider this bug fixed then ? I also have a question about the Tcl_UtfToExternalDString calls in this file. Most of the time, TkWinGetUnicodeEncoding() result is used as 1st parameter, while NULL is used once (for utfTitle). Is it inteneded or is it a rampant bug ? I've used TkWinGetUnicodeEncoding() in my patch btw. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2011-10-10 14:00 Message: >Why SetCurrentDirectoryA? I would expect this to fail if the current >directory contains non ASCII chars. It will fail when the current directory contains characters outside of the standard Windows encoding (cp1252). Not everyting in Tk is already converted to use UNICODE correctly.... See Tk bug [1913750] which is already submitted for this known problem ;-) Introducing -DUNICODE means that this problem becomes visible in the source code immediately a system calls ending in "A" ;-) ---------------------------------------------------------------------- Comment By: Mark Janssen (mpc_janssen) Date: 2011-10-10 13:44 Message: Why SetCurrentDirectoryA? I would expect this to fail if the current directory contains non ASCII chars. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2011-10-10 13:32 Message: Thanks! Done ---------------------------------------------------------------------- Comment By: Thomas MENEZ (thomasmenez) Date: 2011-10-10 13:02 Message: Thanks to Mark Janssen's suggestion, I have tried the following attached patch. This fix seems to be OK on my side (XP). Could you please double check and integrate it back to the Tk trunk ? Thanks ! (The problem was reproducible under 7 btw). ---------------------------------------------------------------------- Comment By: Mark Janssen (mpc_janssen) Date: 2011-10-08 00:37 Message: Seems that the lines in tkWinDialog.c: char *initDir = chooseDirSharedData->utfInitDir; SetCurrentDirectory(initDir); Neglects to change the utfInitDir to the external encoding. ---------------------------------------------------------------------- Comment By: Thomas MENEZ (thomasmenez) Date: 2011-01-22 13:52 Message: With -DUNICODE set (build defaults) everything *looks* correct from a Tk standpoint, i.e. the initialDir string is correct until the SendMessage to tell windows to set the dir (The BFFM_INITIALIZED event is correctly generated under these circumstances), just as if the problem lied within Windows. ---------------------------------------------------------------------- Comment By: Thomas MENEZ (thomasmenez) Date: 2011-01-22 13:29 Message: Prio to highest (bllocker). Assigned to nijtmans. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3163893&group_id=12997 |