Quote Char Variant Detector

Detect single- or double-quote conventions in isolated field-token samples, requiring complete paired delimiters and doubled interior quotes; single quotes are a dialect hint rather than RFC CSV.

Description

Quoted field samples can reveal whether an export uses double-quote or single-quote delimiters.

Quoted field samples can reveal whether an export uses double-quote or single-quote delimiters. A complete field token includes its outer quotes; decoded cell values usually no longer contain this evidence.1

Detect single- or double-quote conventions in isolated field-token samples, requiring complete paired delimiters and doubled interior quotes; single quotes are a dialect hint rather than RFC CSV.

When to use Quote Char Variant Detector

Use this tool to detect single- or double-quote conventions in isolated field-token samples, requiring complete paired delimiters and doubled interior quotes; single quotes are a dialect hint rather than RFC CSV.

Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.

How to use Quote Char Variant Detector and understand its results

  1. Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
  2. Enter tokens using the field table and calculation rules, then run the tool.
  3. Read quoteCharacters, ambiguous, unrecognizedCount. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
tokensTokenslist of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000Required

Provide isolated raw field tokens. A token enclosed in double quotes is recognized only when every interior double quote is paired; otherwise the corresponding single-quote pattern is tried. The result lists recognized conventions in double-then-single order and counts unrecognized tokens. Both conventions, or neither convention, produce ambiguous true. Unrecognized samples do not by themselves make the result ambiguous when exactly one convention is recognized.

ambiguous = number of distinct recognized quote conventions ≠ 1

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
quoteCharactersQuote characterslist of string
ambiguousAmbiguousboolean
unrecognizedCountUnrecognized countinteger; minimum: 0; maximum: 9007199254740991
json
{
  "input": {
    "tokens": [
      "'Ada'",
      "'O''Brien'",
      "plain"
    ]
  },
  "output": {
    "quoteCharacters": [
      "'"
    ],
    "ambiguous": false,
    "unrecognizedCount": 1
  }
}

Limitations and assumptions

This does not parse a CSV document, infer delimiter positions or treat single-quoted fields as RFC 4180 CSV. Empty and unquoted tokens are unrecognized. A recognized token establishes only the local spelling pattern.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.

Alternative or Complementary methods

Use RFC 4180 Quoted Field Parser Check: Check RFC 4180 field quoting with explicit Unicode and CR/LF extensions; blank records are retained, and field-width consistency is checked separately. For a complementary task, use Doubled-Quote Escape Validator: Validate one double-quoted CSV field token, accepting interior quotes only in doubled pairs; this does not validate an entire CSV document.

References

  1. Quote Char Variant Detector — tool.io

Similar or alternative tools

  • RFC 4180 Quoted Field Parser Check

    Check RFC 4180 field quoting with explicit Unicode and CR/LF extensions; blank records are retained, and field-width consistency is checked separately.

  • Doubled-Quote Escape Validator

    Validate one double-quoted CSV field token, accepting interior quotes only in doubled pairs; this does not validate an entire CSV document.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies