Page 2 of 2
Re: many bug about local file/directory when name is utf8
Posted: Sat May 29, 2021 1:53 pm
by nageswaragunupudi
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.
Re: many bug about local file/directory when name is utf8
Posted: Sun May 30, 2021 8:15 am
by ssbbs
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
[నామము]
పేరు=రమణ
ఇంటిపేరు=చెరువు
[ద్వితీయము]
వయసు=40
జీతము=20000
I had test environment:
c:\test\中國龍咙\test.ini
c:\test\中國龍咙\中國龍咙.exe
than run 中國龍咙.exe to read/write test.ini..... fail!!
Re: many bug about local file/directory when name is utf8
Posted: Sun May 30, 2021 1:56 pm
by nageswaragunupudi
This is my test program
Code: Select all | Expand
#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

Re: many bug about local file/directory when name is utf8
Posted: Sun May 30, 2021 3:11 pm
by ssbbs
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

utf8.ini is encode 'UTF-8' ?
Re: many bug about local file/directory when name is utf8
Posted: Sun May 30, 2021 3:54 pm
by nageswaragunupudi
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"