Skip to content

autoDetectEncoding is not passed through #45

@TeWeBu

Description

@TeWeBu

Thanks for taking the time to help fix project's bugs!

CSVparserConfig.autoDetectEncoding is not passed trough to CSVTextStream.autoDetectEncoding in CSVInterface.StreamParseCSV

As a result, it is allways enabled, even if user sets it to false.

Solution:

Insert
CSVstream.autoDetectEncoding = .autoDetectEncoding
into
StreamParseCSV
like so:
.....
With configObj
CSVstream.bufferSize = .bufferSize
CSVstream.endStreamOnLineBreak = True
CSVstream.linebreakMatchingBehavior = EndLineMatchingBehavior.OnlyBackwardSense
CSVstream.unifiedLFOutput = .multiEndOfLineCSV
CSVstream.utf8EncodedFile = .utf8EncodedFile
CSVstream.autoDetectEncoding = .autoDetectEncoding '<-------------- solves this issue
CSVstream.OpenStream .path
commToken = AscW(.commentsToken)
dynamicType = .dynamicTyping
dTTemplate() = .dTypingTemplate
dTTargets() = .dTypingLinks
IgnoreCommentLines = .skipCommentLines
IgnoreEmptyLines = .skipEmptyLines
IgnoreLines = (IgnoreCommentLines Or IgnoreEmptyLines)
TemplateDefined = .dTTemplateDefined
TargetsDefined = .dTTemplateLinksDefined
fieldDelimiter = .dialect.fieldsDelimiter
RecordDelimiter = .dialect.recordsDelimiter
EndRecord = .endingRecord
StartRecord = .startingRecord
UseUnixEscapeSeq = (.dialect.escapeMode = unix)
End With
....

Thank you for this library. It really helps!

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptfixedThe issue has been corrected

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions