mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2007
Posts: 1
P
Mostly harmless
OP Offline
Mostly harmless
P
Joined: May 2007
Posts: 1
mircroot\temp\test contents:
Code:
[test]
test=10test3test8test

//echo -a $readini(temp\test,test,test)
returns 10test3test8test

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try putting a space between the = and the Ctrl+K character.

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
I won't consider this a bug until you show us how you were able to use /writeini to send the eaten color codes to the .ini in the first place.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
At no point does the OP state that the information was written with /writeini. As ini files can be edited using a text editor, it's possible that the entry was made in that manner, rather than using /writeini.

Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
Microsoft Windows does not support control codes in INI files. this is not a mIRC problem but a 'feature' in Windows. nothing you can do about it except using $chr() or $encode/$decode.
I used to use $decode uptill the moment it was locked by default :-[ it worked perfectly but unfortunately I can't use it anymore since users have to unlock $decode for it to work...

it goofed up for me all the time while trying to use control codes in ini files, usually by not returning the entire lines.


If it ain't broken, don't fix it!
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
There is no official ini file specification, therefor control codes are neither supported not unsupported in the file format itself. The ini file format is a very old configuration storage method that was surpased a long time ago, though never fully abandoned (obviously).

While it may not (im not certain) be natively supported by many API's or by microsofts API's, it is certainly not something that can not be done or that is a limitation of the format. Rather, it is a limitation of the API (or custom routine) used by the application/programming language.

There is an unofficial specification here: http://www.cloanto.com/specs/ini.html

So basically this is a limitation (or intentional behavior?) of mIRCs routines and not of the file format itself.

There are definately other programs that utilize an ini file storage method and handle control codes just fine. (a common example of this is flashfxp)


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
I had closely related problem a few years back, which is when I stopped using ini files to save things, and switched to using hash tables. More difficult to use, but if you write a nice interface, they work great. smile


NaquadaBomb
www.mirc-dll.com

Link Copied to Clipboard