View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002822 | JEDI VCL | 00 JVCL Components | public | 2005-03-30 12:54 | 2005-05-17 13:36 |
Reporter | anonymous | Assigned To | jfudickar | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | 3.00 | |||
Summary | 0002822: TJvAppXMLFileStorage.ReadString bug if string containsLineFeed characters | ||||
Description | BUG: When the string to read contains linefeed chars (0000013#10), the leading whitespace is trimmed. EXAMPLE: var MULTILINE_STRING: string = 'line1 ' + 0000013#10 + ' level1' + 0000013#10 + ' level2' + 0000013#10; procedure test(aStorage: TJvAppXMLFileStorage); begin aStorage.WriteString('path', MULTILINE_STRING); aStorage.Reload; ShowMessage(aStorage.ReadString('path','')); end; Result: You should see the messagebox showing 2. and 3. lines with wrong indents.(May this be the underlying XML component's bug) | ||||
Tags | No tags attached. | ||||
|
Nobody could reproduce ??? |
2005-04-28 19:06
|
JvXmlStorageWS_BUG.zip (3,987 bytes) |
|
Attached a sample... |
|
Hi, i've looked into it now. But i didn't know why this is so implemented. It's in the TJvSimpleXMLElemText.LoadFromStream The problem is the following Case statement: case lBuf[I] of '<': begin //Quit text Dec(lStreamPos); Count := 0; Break; end; ' ': if lPos = 0 then begin Inc(lPos); St := St + ' '; end; else begin lPos := 0; St := St + lBuf[I]; end; end; All multiple blanks will be reduced to one blank. THis is not a problem of the start of line. I didn't know, if this is a special requirement of xml. Any further comments are welcome. Greetings Jens |
|
Neither do I know about standart way of whitespace handling in XML, but IMHO TJvAppXMLFileStorage must be consistent. For a quick fix, I check the string for CR/LF and use WriteStrings if so. |
|
By the way for XML standartization: http://www.ucc.ie/xml/#space |
|
Fixed in CVS. Please give it a try. |
|
It seems OK now. Sorry it' s a bit late, I forgot to answer. The case well may be closed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-03-30 12:54 | anonymous | New Issue | |
2005-04-19 07:35 | muk | Note Added: 0007029 | |
2005-04-28 19:06 | muk | File Added: JvXmlStorageWS_BUG.zip | |
2005-04-28 19:09 | muk | Note Added: 0007082 | |
2005-05-02 13:38 | jfudickar | Note Added: 0007101 | |
2005-05-02 19:01 | muk | Note Added: 0007103 | |
2005-05-02 19:02 | muk | Note Added: 0007104 | |
2005-05-05 01:18 | jfudickar | Note Added: 0007109 | |
2005-05-05 01:18 | jfudickar | Assigned To | => jfudickar |
2005-05-05 01:18 | jfudickar | Status | new => feedback |
2005-05-17 13:16 | muk | Note Added: 0007171 | |
2005-05-17 13:36 | jfudickar | Status | feedback => resolved |
2005-05-17 13:36 | jfudickar | Fixed in Version | => 3.00 |
2005-05-17 13:36 | jfudickar | Resolution | open => fixed |
2005-12-03 04:23 | elahn | Relationship added | has duplicate 0003332 |