Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decode-csv struggles with round quotes #588

Open
TobiasNx opened this issue Dec 17, 2024 · 0 comments
Open

decode-csv struggles with round quotes #588

TobiasNx opened this issue Dec 17, 2024 · 0 comments

Comments

@TobiasNx
Copy link
Contributor

TobiasNx commented Dec 17, 2024

Reported by Verbundgruppe:

It cannot read a csv record if it contains curly quotes :

https://metafacture.org/playground/?flux=inputFile%0A%7C+open-file%0A//+important+decoding+csv+need+as-lines%0A%7C+as-lines%0A%7C+decode-csv%28hasHeader%3D%22true%22%2C+separator%3D%22\t%22%29%0A%7C+encode-yaml%0A%7C+print%0A%3B&data=publication_title%09first_author%09first_editor%09publisher_name%09publication_type%09medium%09title_url%09print_identifier%09online_identifier%09title_id%09doi_identifier%09subject_area%09language%09ddc%09access_type%09package_name%09package_id%09access_start_date%09access_end_date%09last_changed%09status%09listprice_eur%09listprice_gbp%09listprice_usd%09notes%09date_monograph_published_print%09date_monograph_published_online%09monograph_volume%09monograph_edition%09monograph_parent_collection_title%09parent_publication_title_id%09date_first_issue_online%09num_first_vol_online%09num_first_issue_online%09date_last_issue_online%09num_last_vol_online%09num_last_issue_online%09coverage_depth%09zdb_id%09ezb_id%09package_ezb_anchor%09oa_type%09oa_apc_eur%09oa_apc_usd%09oa_apc_gbp%09package_isil%09title_wekb_uuid%09package_wekb_uuid%09preceding_publication_title_id%09superceding_publication_title_id%09embargo_info%0AThe+%E2%80%9CHistoricization%22+of+Contemporary+Literature%09Guangwei%2C+Cheng%09%09Routledge%09Monograph%09Book%09https%3A//www.taylorfrancis.com/books/9781003505716%099781032815701%099781003505716%0910.4324/9781003505716%0910.4324/9781003505716%09Area+Studies%2CLanguage+%26+Literature%09%09%09Paid%09Taylor+%26+Francis+-+HBZ+Consortia+Package%09Taylor_and_Francis_HBZ_Consortia%09%09%092024-09-30%09Current%09150%2C00%09150%2C00%09200%2C00%09%092024-09-03%092024-09-03%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%09%098275554c-878c-41d0-9b0e-bd169ae75a55%0942c41359-719c-4767-b023-0a85cdc034b2%09%09%09%0A

embargo_info: ""Exception in thread "main" java.lang.IllegalArgumentException: wrong number of columns (expected 51, was 0) in input line: The “Historicization" of Contemporary Literature	Guangwei, Cheng		Routledge	Monograph	Book	https://www.taylorfrancis.com/books/9781003505716	9781032815701	9781003505716	10.4324/9781003505716	10.4324/9781003505716	Area Studies,Language & Literature			Paid	Taylor & Francis - HBZ Consortia Package	Taylor_and_Francis_HBZ_Consortia			2024-09-30	Current	150,00	150,00	200,00		2024-09-03	2024-09-03										8275554c-878c-41d0-9b0e-bd169ae75a55	42c41359-719c-4767-b023-0a85cdc034b2	
	at org.metafacture.csv.CsvDecoder.process(CsvDecoder.java:94)
	at org.metafacture.csv.CsvDecoder.process(CsvDecoder.java:39)
	at org.metafacture.strings.StringMatcher.process(StringMatcher.java:91)
	at org.metafacture.strings.StringMatcher.process(StringMatcher.java:35)
	at org.metafacture.io.LineReader.process(LineReader.java:69)
	at org.metafacture.io.LineReader.process(LineReader.java:55)
	at org.metafacture.io.LineReader.process(LineReader.java:37)
	at org.metafacture.io.FileOpener.process(FileOpener.java:158)
	at org.metafacture.io.FileOpener.process(FileOpener.java:41)
	at org.metafacture.flux.parser.StringSender.process(StringSender.java:43)
	at org.metafacture.flux.parser.Flow.start(Flow.java:118)
	at org.metafacture.flux.parser.FluxProgramm.start(FluxProgramm.java:168)
	at org.metafacture.runner.Flux.main(Flux.java:87)

I assume that this error also happens for curly simple quotes , apostrophs and commas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant