FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour cGetFile32 not support Chinese File Name
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
cGetFile32 not support Chinese File Name
Posted: Fri Feb 22, 2019 09:32 AM
Hi
Yesterday, I tested it.
Code (fw): Select all Collapse
LOCAL cFileName
LOCAL cString := "所有 Excel 檔案|*.XLS|" + ;
                 "Excel 檔案     |*.XLS|" + ;
                 "所有檔案       | *.*"

cFileName := cGetFile( cString, "請選擇要抓入之檔案名稱", , "" )
cFileName := cGetFile32( cString, "請選擇要抓入之檔案名稱", , "" )


cFileName Get string below:


D:\客戶資料2.xls
or
R:\Project\CustomerRelationshipManagementErp\SQL-Unicode-SDI\242\Fivetech\Exe32\客戶資料2.xls


Run this code not work below:

Code (fw): Select all Collapse
If ! File( ( cFileName ) )  //==> Alwayse appear File not


Code (fw): Select all Collapse
oExcel := TOleAuto():New( "Excel.Application" )
oExcel:WorkBooks:Open(cFileName)


or

Code (fw): Select all Collapse
oExcel := CreateObject( "Excel.Application" ) 
oExcel:WorkBooks:Open(cFileName)


Got Error message below:


Error description: Error Excel.Application:WORKBOOKS/14 DISP_E_BADPARAMCOUNT: OPEN


So, If I change Chinese File Name to English Name.
It's work fine.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: cGetFile32 not support Chinese File Name
Posted: Sun Feb 24, 2019 11:20 PM

If you use Harbour instead of xHarbour it works fine with utf8 file names.

Regards



G. N. Rao.

Hyderabad, India
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: cGetFile32 not support Chinese File Name
Posted: Mon Feb 25, 2019 01:41 AM
nageswaragunupudi wrote:If you use Harbour instead of xHarbour it works fine with utf8 file names.


Rao,
Yes, I thinking maybe it's finnal solution.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit

Continue the discussion