mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 248
B
bwuser Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
Before calling writeini:

Code:
[Test]
; set this to 0 or 1
test_mode=1

; your name
user_name=cool


After:

Code:
[Test]
test_mode=1
user_name=cool

; set this to 0 or 1
; your name

Last edited by bwuser; 30/05/10 10:07 AM.
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks this has been fixed for the next version.

Joined: Jul 2006
Posts: 248
B
bwuser Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
Hey Khaled, thanks for the fix!

Two more things for you, dunno how you feel about them:

a) It's still removing empty lines between comments and key/value pairs. Windows' INI routines preserve those.

b) A file saved as ANSI/Windows-1252 will be converted to UTF-8 any time writeini is issued, even if it's on a different section and/or key. Is that intended?

Thanks!

Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks, I am aware of the empty lines issue, however this was actually one of the problems I had with how Windows handles INI files. In previous versions, most INI files ended up with random numbers of empty lines, or with empty lines removed, after long periods of use. The INI routines in the new version of mIRC will consistently use empty lines where necessary and will remove any extraneous empty lines.

Regarding the encoding issue, this is by design. Since mIRC is now a Unicode application, it will consistently load and save files as UTF-8. This is built-in to the core file routines and applies to all text files.


Link Copied to Clipboard