79659222

Date: 2025-06-09 16:44:49
Score: 0.5
Natty:
Report link

When your data contains quotes, CSV turns them into double quotes ("") and then wraps the whole field in quotes. So yes — CSV turns your input "foo014" into """foo014""" — that’s the correct and expected behavior. "foo014"

Is interpreted as:

Quote → escape as ""
f
o
o
0
1
4
Quote → escape as ""

Then the entire field is wrapped in quotes, resulting in:

"""foo014"""

about your test: Your actual output is correct — the test expectation is wrong. To match Apache Commons CSV output, update your expected string to:

val expected = """
EPPN,FirstName,LastName,Email,ClassStanding,StudentID,Degree,College,Department,SuitableRole
"""foo014""",Foo,Bar,[email protected],,9200#8210,,,,ROLE_TENANT_ADVISOR
""".trimMargin()
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (1):
Posted by: sadkeyvanfar