1

My case: List of Danish-named students (with names including characters as ü,æ,ø,å). Minimal Working Example CSV file:

Fornavn;Efternavn;Mobil;Adresse
Øjvind;Ørnenæb;87654321;Paradisæblevej 125, 5610 Åkirkeby
Süzette;Ågård;12345678;Ærøvej 123, 2000 Frederiksberg

In-browser neo4j-editor:

$ LOAD CSV WITH HEADERS  FROM 'file:///path/to/file.csv' AS line FIELDTERMINATOR ";"
CREATE (:Elev {fornavn: line.Fornavn, efternavn: line.Efternavn, mobil: line.Mobilnr, adresse: line.Adresse})

Resulting in registrations like: Neo4j browser screenshot, containing ?-characters, where Danish/German characters are wanted. My data come from a Learning Management System into Excel. When exporting as CSV from Excel, I can control file encoding as a function of the Save As dialogue box. I have tried encoding from Excel as "UTF-8" (which the Neo4j manual says it wants), "ISO-Western European", "Windows-Western European", "Unicode" in separately named file, and adjusted the FROM 'file:///path/to/file.csv' clause accordingly.

Intriguingly, exactly the same misrepresentation results, independent of which (apparent?) file encoding, I request from Excel when "Saving As". When Copy-pasting the names and addresses directly into the editor, I do not encounter the same problem.

1 Answers1

1

Check Michael Hunger's blog post here which contains some tips, namely:

if you use non-ascii characters (umlauts, accents etc.) make sure to use the appropriate locale or provide the System property -Dfile.encoding=UTF8

FrobberOfBits
  • 17,634
  • 4
  • 52
  • 86
  • Seems like this won't do the trick: `:GET /db/manage/server/jmx/domain/org.neo4j/instance%3Dkernel%230%2Cname%3DConfiguration` gives me `[ { "description": "The configuration parameters used to configure Neo4j", "name": "org.neo4j:instance=kernel#0,name=Configuration", "attributes": [{...}, { "description": "Configuration attribute", "name": "-Dfile.encoding", "value": "UTF8", "isReadable": "true", "type": "java.lang.String", "isWriteable": "false ", "isIs": "false " },...` – Morten Engelsmann Dec 21 '15 at 18:35
  • Even though I interpret the above `:GET` feedback as the file encoding is already set correctly, I still get unwanted output. I will take a look at the [Hunger blog](http://jexp.de/blog/2014/10/load-cvs-with-success/) mentioned by @FrobberOfBits. – Morten Engelsmann Dec 21 '15 at 18:45