Opened 16 years ago
Closed 16 years ago
#1540 closed Bug (No Bug)
_FileReadToArray bug?
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.6.0 | Severity: | None |
| Keywords: | Cc: |
Description
_FileReadToArray reads only 2 lines of my textfile.
$Local_FileName = "drucker_log.txt"
DATEI_TO_STRING($Local_FileName)
; datei einlesen
Func DATEI_TO_STRING($Local_File)
Local $DateiArray
$OldPath = @ScriptDir & "/" & $Local_File
_FileReadToArray($OldPath, $DateiArray)
ConsoleWrite("Zeilen: " & $DateiArray[0] & @crlf)
For $x = 1 To $DateiArray[0]
ConsoleWrite('Datensatz ' & $DateiArray[$x] & @crlf)
Next
EndFunc
i add my textfile.
Attachments (1)
Change History (5)
by , 16 years ago
| Attachment: | drucker_log.txt added |
|---|
comment:2 by , 16 years ago
Replying to jchd:
That file uses @LF as line termination.
so its no bug of _FileReadToArray() ?
but if it is not a bug, is there a method to read the whole file into an array?
comment:3 by , 16 years ago
@bergedorf:
PS: Use the forum for your question. (More readers, faster response)
If it turns out to be a bug after all you can just update this ticket again.
comment:4 by , 16 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
It has nothing to do with @LF. It has everything to do with all the lines except the first being prefixed with the NULL character. This is not a bug in _FileReadToArray(). You just have a binary file, not a text file.

the textfile that is read incorrect