Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Fixing llList2CSV and llCSV2List?

Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
04-09-2006 09:05
I notice that Linden Labs has fixed the string/hex functions (albeit in stages) to make them work correctly in the new calls while keeping backwards compatibility with the old functions in the old calls.

Currently, llList2CSV doesn't quote commas in lists, depending on the angle brackets in vectors to hide them. This means that llList2CSV is useless for marshalling arbitrary lists into strings and people have to use things like llDumpList2String...llParseString2List pairs using obscure separators.

For example, llList2CSV(["pollen","obscure",",","\""]); produces pollen, obscure, ,, ". This should produce pollen,obscure,",","""" according to the most common CSV conventions.

That is, strings containing commas and quotes are quoted, and quotes inside strings are doubled. When converting back, quoted strings are unquoted and doubled quotes are turned into quotes.

A new pair of functions, llList2CSVCorrect and llCSVCorrect2List similar to the recently added functions for string/hex conversion are badly needed.... because no use of llDumpList2String can avoid the potential for a collision... it can only make it unlikely.
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
04-10-2006 17:09
I'm inquiring further about this.
_____________________