Home Ask Login Register

Developers Planet

Your answer is one click away!

StartVader February 2016

User import from CSV German

Using the Moodle user import from CSV, we have the problem, that some German names with letters like Ö,ä,ü are imported "falsely". I presume, that the problem is in the encoding, here are the two possibilities, which I tested:

  1. ANSI-encoding: The German letters disappear, for example Michael Dürr appears like Michael Drr in the listed users to import.
  2. UTF-8-encoding: The letters appear as Michael Drürr

Does anyone has solution for the problem, or it has to be fixed one by one in the user's list?


Russell England February 2016

I'm guessing the original file is using a different encoding. Try to convert the csv file to utf8 then import.

How do I correct the character encoding of a file?

levus.lazarus February 2016

you have to configure the database connection to make sure the encoding you choose for your webapplication (moodle) is the same as the encoding your database connection will choose. look for SET NAMES 'utf8' or similar if you use mariadb/mysql as database.

and compare off course to the encoding of your import file. maybe you will need to convert it first. in any case the encoding of your web gui, the file, and the database connection (client character set) should be the same.

for web application check in your browser via View->Encoding or something similar, or check the meta header tag for the encoding in your html source code.

for file, use some editor or the like that will display the chars correctly and will indicate the charset.

for database, depends on your database.)

Post Status

Asked in February 2016
Viewed 3,569 times
Voted 5
Answered 2 times


Leave an answer

Quote of the day: live life