minicsv icon indicating copy to clipboard operation
minicsv copied to clipboard

can't use csv::ifstream without calling enable_trim_quote_on_str()

Open eurol opened this issue 8 years ago • 1 comments

quote_unescape parameter is empty by default. Trying to get fields using >> operator will never return.

	mini::csv::ifstream is("list.txt");
	is.set_delimiter(',',"$$");
//	is.enable_trim_quote_on_str(false, '~'); // (1)
	if (is.is_open())
		while (is.read_line())
	{
		int q;
		is >> q; // without (1) loops infinitely
	}

eurol avatar Feb 02 '18 08:02 eurol

Same here, possible fix: add quote_unescape = """; to ifstream's init().

alb-i avatar May 18 '18 18:05 alb-i