From: SourceForge.net <no...@so...> - 2004-07-16 21:35:37
|
Bugs item #983509, was opened at 2004-07-01 12:05 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=983509&group_id=10894 Category: 52. Config Reporting Group: development: 8.5a2 Status: Open Resolution: None Priority: 5 Submitted By: Don Porter (dgp) Assigned to: Andreas Kupries (andreas_kupries) Summary: Tcl_RegisterConfig ignores encoding failure Initial Comment: Tcl_RegisterConfig() receives a "valEncoding" argument that specifies the encoding for the string values in the "configuration" table of values. Those values are copied into a dictionary, converting to UTF-encoding. Problem arises when Tcl_GetEncoding(NULL, valEncoding) returns NULL -- essentially meaning the appropriate *.enc file for that encoding could not be found. In that circumstance, T_RC ignores the encoding failure, and goes ahead an converts the config values according to whatever Tcl thinks the system encoding is at the moment. Since T_GE() failed, we know this cannot be the right thing -- we are definitely converting based on the wrong encoding -- and worse, we can't even predict what wrong thing T_RC will do instead. When the "valEncoding" cannot be found, no data should be copied over to the dictionary, since it cannot be done correctly. Whether [pkgconfig] should also not be defined, or whether it should be defined with no data, I'm not sure. ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2004-07-16 17:35 Message: Logged In: YES user_id=80530 I don't know whether an 8.5-based Tclkit is something that exists. If it did, it could avoid this problem by making sure the valEncoding value is "utf-8". If valEncoding were something like "iso8859-1", though, then using that encoding requires finding the iso8859-1.enc file while requires mounting the VFS in which that file is found, which requires a [package require] of the tclvfs package, which requires creating an interp, which includes a call to Tcl_RegisterConfig. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2004-07-16 17:22 Message: Logged In: YES user_id=75003 In other words, an 8.5-based Tclkit is currently always using the wrong encoding for the embedded values ? More pressure on us to understand and untangle the startup, encoding, fs, etc, right ? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2004-07-16 17:19 Message: Logged In: YES user_id=80530 If we take that approach, though, I expect a Tclkit built on Tcl 8.5 to always panic at startup. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2004-07-16 15:25 Message: Logged In: YES user_id=75003 We could also 'panic'. This might actually best, because something is so seriously wrong that we cannot fix the situaiton, IMHO. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=983509&group_id=10894 |