• ben.brugman (7/21/2016)


    How do you handle EOL within fields? (Or a bit less dramatic: How do you handle delimiters within a field.)

    Especially handling the EOL within fields is a bit problematic, although I have a 'solution' it is slow and rather cumbersome.

    I did not have to.

    Our suppliers were kind enough to agree on a protocol where EOL within a "Product Description" or "delivery instruction" fields were replaced with an "impossible" character (like CHAR(255) or something)

    So how do you differentiate between an EOL between textqualifiers and and EOL which is the actual end of the line or row. (I am using Transact SQL for this at the moment and my wish is to keep my technologie limited to this only.)

    I have an idea how it can be done, but the approach is in development stage, to be tested on practical cases, not ready to be published yet.

    Not reasonlable is for a humanity hardly a reason not to do it.

    Not 'legal', where is it determined that this is not 'legal'?

    For myself I can think of a reason to mix textqualifiers. If there is a column which does not contain a double quote, then a double qoute is an excelent textqualifier for that column. Same goes for another column which does not contain a single quote. For a Parser which parses from start to finish this is hardly a problem, if the first non white symbol in a field is a textqualifier, this is the textqualifier for that field.

    It's unreasonable because it creates more trouble than it was without it.

    It all sounds OK when you exporting a file.

    But when you importing - you need to make decisions based on uncertain criteria.

    For example, if you have a string like this:

    'content of the field 1,here is field 2,field 3 has a description of a 'new item'

    How will you interpret such string?

    Is it a single field quoted with single quotes?

    Or a single quote just happened to be the first character in a string which did not need to be quoted because it did not have a delimiter within its content?

    Unless you have a strict rule that every value must be quoted you have no way to tell that 1st character is a "dynamic quote" or not.

    _____________
    Code for TallyGenerator