While i find nothing at all wrong with using that, i think alot of people balk on the idea of $encode and $decode becuase of its missuse in other places.
Also I felt half the idea of an INI file is easy textual reading of it, whcih isnt so easy with encoded text.

So on that I submit these, they appear huge but its simplier than creating a loop.

either he could use...
Code:
alias wr { writeini -n $1 $2 $3 $replacex($4-,&,&38,$chr(1),&01,$chr(2),&02,$chr(3),&03,$chr(4),&04,$chr(5),&05,$chr(6),&06,$chr(7),&07,$chr(8),&08,$chr(9),&09,$chr(10),&10,$chr(11),&11,$chr(12),&12,$chr(13),&13,$chr(14),&14,$chr(15),&15,$chr(16),&16,$chr(17),&17,$chr(18),&18,$chr(19),&19,$chr(20),&20,$chr(21),&21,$chr(22),&22,$chr(23),&23,$chr(24),&24,$chr(25),&25,$chr(26),&26,$chr(27),&27,$chr(28),&28,$chr(29),&29,$chr(30),&30,$chr(31),&31) }
alias rr { return $replacex($readini($1,n,$2,$3),&01,$chr(1),&02,$chr(2),&03,$chr(3),&04,$chr(4),&05,$chr(5),&06,$chr(6),&07,$chr(7),&08,$chr(8),&09,$chr(9),&10,$chr(10),&11,$chr(11),&12,$chr(12),&13,$chr(13),&14,$chr(14),&15,$chr(15),&16,$chr(16),&17,$chr(17),&18,$chr(18),&19,$chr(19),&20,$chr(20),&21,$chr(21),&22,$chr(22),&23,$chr(23),&24,$chr(24),&25,$chr(25),&26,$chr(26),&27,$chr(27),&28,$chr(28),&29,$chr(29),&30,$chr(30),&31,$chr(31),&38,&) }



or simply en/decapsulate his stringsare write/read using
Code:
alias txt2ini { return $replacex($1,&,&38,$chr(1),&01,$chr(2),&02,$chr(3),&03,$chr(4),&04,$chr(5),&05,$chr(6),&06,$chr(7),&07,$chr(8),&08,$chr(9),&09,$chr(10),&10,$chr(11),&11,$chr(12),&12,$chr(13),&13,$chr(14),&14,$chr(15),&15,$chr(16),&16,$chr(17),&17,$chr(18),&18,$chr(19),&19,$chr(20),&20,$chr(21),&21,$chr(22),&22,$chr(23),&23,$chr(24),&24,$chr(25),&25,$chr(26),&26,$chr(27),&27,$chr(28),&28,$chr(29),&29,$chr(30),&30,$chr(31),&31) }
alias ini2txt { return $replacex($1,&01,$chr(1),&02,$chr(2),&03,$chr(3),&04,$chr(4),&05,$chr(5),&06,$chr(6),&07,$chr(7),&08,$chr(8),&09,$chr(9),&10,$chr(10),&11,$chr(11),&12,$chr(12),&13,$chr(13),&14,$chr(14),&15,$chr(15),&16,$chr(16),&17,$chr(17),&18,$chr(18),&19,$chr(19),&20,$chr(20),&21,$chr(21),&22,$chr(22),&23,$chr(23),&24,$chr(24),&25,$chr(25),&26,$chr(26),&27,$chr(27),&28,$chr(28),&29,$chr(29),&30,$chr(30),&31,$chr(31),&38,&) }


ie: /writeini file section item $txt2ini(text)
& $ini2txt($read(file,section,item)

* for anyone who wonders what all that rubbish above is, im simply locating any asc values from 01 to 31 and replacing them with &01 to &31, and viseversa. also replace & with &38 and back again, this prevents a litteral text of "&20" from being converrted by mistake as it becomes "&3820"

* This method of course leaves all other text in the line in its original form so is still well readable, even editable with a small amount of care
ex:
this is normal text this is bold text & now underline as well
this is normal text &02this is bold text &38 now &31underline as well