From: SourceForge.net <no...@so...> - 2004-06-28 07:36:52
|
Bugs item #867509, was opened at 2003-12-30 15:02 Message generated for change (Comment added) made by bladesun You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=867509&group_id=10894 Category: 44. Parsing and Eval Group: obsolete: 8.4.5 Status: Open Resolution: None Priority: 5 Submitted By: rong bing (rongbing11968) Assigned to: Don Porter (dgp) Summary: Tcl_EvalFile for chinese path in Win2000, occur failed Initial Comment: Tcl_EvalFile for chinese path in Win2000, occur failed: void CTclExecDlg::OnButtonRun() { UpdateData(TRUE); Tcl_FindExecutable(AfxGetApp()- >m_pszExeName); Tcl_Interp* pInterp = Tcl_CreateInterp(); if(pInterp == NULL) { TRACE(_T("Interp create failed. ")); return; } Tcl_Preserve((ClientData)pInterp); char scriptFile[1024]; strcpy(scriptFile, m_sScriptPath); Tcl_DString tStr1; Tcl_ExternalToUtfDString(NULL, scriptFile, -1, &tStr1); int result = Tcl_EvalFile(pInterp, Tcl_DStringValue(&tStr1)); if (TCL_OK != result ) { TRACE(_T("Execute failed. ")); } Tcl_DStringFree(&tStr1); if(Tcl_InterpDeleted(pInterp) == 0) Tcl_DeleteInterp(pInterp); Tcl_Release((ClientData)pInterp); } ---------------------------------------------------------------------- Comment By: bladesun (bladesun) Date: 2004-06-28 15:36 Message: Logged In: YES user_id=1072261 PS: I tested the same program under tcl8.3.5(complied using tcl8.3.5-src.tar.gz from here), there is no problem! ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-06-28 15:31 Message: Logged In: NO PS: I tested the same program under tcl8.3.5(complied using tcl8.3.5-src.tar.gz from here), there is no problem! ---------------------------------------------------------------------- Comment By: bladesun (bladesun) Date: 2004-06-28 10:18 Message: Logged In: YES user_id=1072261 I have encountered the similar problem! my OS: win2000 SP4 Chinese my Tcl Realese: ActiveTcl8.4.6.1-win32-ix86-99631 following is my very simple program: void main(int argc, char *argv[]){ char *str = "D:/MyCode/Going/test.tcl"; Tcl_Interp* interp=Tcl_CreateInterp(); Tcl_Init(interp); if(TCL_OK!=Tcl_EvalFile(interp, str)){ Tcl_DeleteInterp(interp); return; } Tcl_DeleteInterp(interp); exit(0); } successed compling under VC6.0! when executing, segment erroe occur, the OS message just like this(translated from chinese): Instruction "0x00000000" references "0x00000000" address which cann't be read when debugging in VC, the message is: Unhandled exception in myprom.exe:0xC0000005: Access Violation. ---------------------------------------------------------------------- Comment By: David Gravereaux (davygrvy) Date: 2004-01-15 17:23 Message: Logged In: YES user_id=7549 D:\Softphone2.2\PROJECT\ICD3.0平台\Rules\my.tcl Is the filename displayed in the error message the correct filename as you expect to see it? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2004-01-14 08:02 Message: Logged In: YES user_id=80530 there is no file attached. ---------------------------------------------------------------------- Comment By: rong bing (rongbing11968) Date: 2004-01-10 10:08 Message: Logged In: YES user_id=940212 The attached file is my test program. When we click RUN button, Tcl_EvalFile will return "counldn't read file D:\Softphone2.2\PROJECT\ICD3.0平台\Rules\my.tcl: no such file or directory". My OS is WinXP chinese version. ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2004-01-09 07:04 Message: Logged In: YES user_id=148712 Don: you spoke up, it's all yours - I wouldn't know where to start ---------------------------------------------------------------------- Comment By: rong bing (rongbing11968) Date: 2004-01-08 17:18 Message: Logged In: YES user_id=940212 m_sScriptPath is "D:\Softphone2.2\project\ICD3.0平台 \rule\rb2004\my.tcl". encoding is CP936. System encoding is CP936. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2004-01-01 00:08 Message: Logged In: YES user_id=80530 what is the value of m_sScriptPath? and what encoding is it in? and what is the system encoding? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=867509&group_id=10894 |