many bug about local file/directory when name is utf8

Re: many bug about local file/directory when name is utf8

Postby nageswaragunupudi » Sat May 29, 2021 1:53 pm

If directory name is ansi and APP name is utf8, file of read/write is ok, only access information of APP have some problem.
If directory name is utf8, all file of read/write have some problem.

I have not come across any problems till now in the above situations.
In case you experience problems with any specific functions, please let us know and we will make efforts to find solutions.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: many bug about local file/directory when name is utf8

Postby ssbbs » Sun May 30, 2021 8:15 am

nageswaragunupudi wrote:Tested TINI class in ini.prg.

Ini file name should be in English, but all contents can be in Unicode

This is the Unicode INI file crated and tested by me:
Code: Select all  Expand view
[నామము]
పేరు=రమణ
ఇంటిపేరు=చెరువు
[ద్వితీయము]
వయసు=40
జీతము=20000
 


I had test environment:
c:\test\中國龍咙\test.ini
c:\test\中國龍咙\中國龍咙.exe
than run 中國龍咙.exe to read/write test.ini..... fail!!
line ID: ssbbstw
WeChat ID: ssbbstw
User avatar
ssbbs
 
Posts: 104
Joined: Mon Oct 17, 2005 3:03 am
Location: Taiwan

Re: many bug about local file/directory when name is utf8

Postby nageswaragunupudi » Sun May 30, 2021 1:56 pm

This is my test program
Code: Select all  Expand view
#include "fivewin.ch"
#include "ini.ch"

REQUEST HB_CODEPAGE_UTF8


function Main()

   local oIni
   local val1,val2,val3,val4

   HB_CDPSELECT( "UTF8" )
   FW_SetUnicode( .T. )

   INI oIni FILE ".\UTF8.ini"
      GET val1 SECTION "నామము"       ENTRY "పేరు"          OF oIni DEFAULT "రమణ"
      GET val2 SECTION "నామము"      ENTRY "ఇంటిపేరు"  OF oIni DEFAULT "చెరువు"
      GET val3 SECTION "ద్వితీయము"  ENTRY "వయసు"   OF oIni DEFAULT 40
      GET val4 SECTION "ద్వితీయము"  ENTRY "జీతము"   OF oIni DEFAULT 20000
   ENDINI

   ? val1, val2, val3, val4

   xbrowser oIni:Sections()

return nil
 


Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: many bug about local file/directory when name is utf8

Postby ssbbs » Sun May 30, 2021 3:11 pm

   HB_CDPSELECT( "UTF8" )
   FW_SetUnicode( .T. )

   INI oIni FILE ".\UTF8.ini" // <--- change to "c:\fwh\tests\中文龍咙\utf8.ini"
      GET val1 SECTION "నామము"       ENTRY "పేరు"          OF oIni DEFAULT "రమణ" <--- 'నామము' is utf8 or ansi ?
      GET val2 SECTION "నామము"      ENTRY "ఇంటిపేరు"  OF oIni DEFAULT "చెరువు"
      GET val3 SECTION "ద్వితీయము"  ENTRY "వయసు"   OF oIni DEFAULT 40
      GET val4 SECTION "ద్వితీయము"  ENTRY "జీతము"   OF oIni DEFAULT 20000

Image

utf8.ini is encode 'UTF-8' ?
line ID: ssbbstw
WeChat ID: ssbbstw
User avatar
ssbbs
 
Posts: 104
Joined: Mon Oct 17, 2005 3:03 am
Location: Taiwan

Re: many bug about local file/directory when name is utf8

Postby nageswaragunupudi » Sun May 30, 2021 3:54 pm

INI oIni FILE ".\UTF8.ini" // <--- change to "c:\fwh\tests\中文龍咙\utf8.ini"

We should not make that change.
Trick is to keep it as ".\" + "filename.ini"
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests