cGetFile32 not support Chinese File Name

cGetFile32 not support Chinese File Name

Postby richard-service » Fri Feb 22, 2019 9:32 am

Hi
Yesterday, I tested it.
Code: Select all  Expand view  RUN

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: Select all  Expand view  RUN

If ! File( ( cFileName ) )  //==> Alwayse appear File not
 


Code: Select all  Expand view  RUN

oExcel := TOleAuto():New( "Excel.Application" )
oExcel:WorkBooks:Open(cFileName)
 


or

Code: Select all  Expand view  RUN

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 (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: cGetFile32 not support Chinese File Name

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: cGetFile32 not support Chinese File Name

Postby richard-service » Mon Feb 25, 2019 1: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 (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests