Modify

Opened 14 years ago

Closed 14 years ago

#2087 closed Bug (No Bug)

IniWrite & IniReadSection bug

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

IniWrite -> "When writing a value that is quoted, the quotes are stripped."

--

IniWrite("test.ini", "Section", "Key", '"quoted text"')
$test = IniReadSection("test.ini", "Section")
ConsoleWrite($test[1][1] & @CRLF)

--

"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Anonymous\Desktop\test.au3"

"quoted text"

Exit code: 0 Time: 0.220

Attachments (0)

Change History (3)

comment:1 by anonymous, 14 years ago

Help-file says that if you read quoted text from ini file - quotes go away because they are simply used for values containing whitespaces. But when reading section with quoted values - you get quote signs. Help file doesn't say a word about that.
I don't think that it's help-file bug, rather it's the IniReadSection bug.

comment:2 by BrewManNH, 14 years ago

Actually the help file says: When writing a value that is quoted, the quotes are stripped. In order to write the quote marks to the value, you must double up the quoting. For example: ""This is a test"" will produce "This is a test" in the file. (this is from IniWrite in the help file)

The help file says nothing about reading values with quotes, just writing them. So, it does strip the quotes, but if they're doubled, the quotes are included in the information written.

comment:3 by trancexx, 14 years ago

Resolution: No Bug
Status: newclosed

String literal in AutoIt is defined as zero or more characters enclosed in quotes (single or double).
I'm sure that anyone who wrote explanation for Ini functions meant it to be understandable for absolute beginners. Probably that's why it's bit confusing. Maybe some English speaking person can write description for more advanced members or maybe they shouldn't be needing it. It's a dilemma.
Either way, no bug.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.