Can't import CSV files including Chinese character

Re: 回复: Re: Can't import CSV files including Chinese character

by Germán Valero -
Number of replies: 1
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
I have often used Notepad++ to change the encoding of a file. It is fast, easy and free ;)
In reply to Germán Valero

Re: 回复: Re: Can't import CSV files including Chinese character

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
For this case, the current encoding is wrong - it is not the correct encoding that goes with the bytes in the file. So if you change the encoding of this file the correct way, like using Notepad++ or any other tool, the characters will never show up correctly - they will show the same wrong characters in a different encoding.
I don't know if it is possible to figure out what went wrong and revert that. I think in this case, the only thing you can do is start over and make sure you know during the whole process of creating the file which encoding you use and make sure that that encoding supports Chinese.
ISO_8859-1 doesn't support Chinese - it is a single byte encoding, only supporting 191 characters. There have been several encoding standards for Chinese, but not this one. So something went wrong in the creation of this file: the original encoding got lost and replaced wrongly by ISO_8859-1, thereby damaging the file.
It is weird that this works on a 2.8. A lot more weird then that it doesn't work on a 3.6.
Average of ratings: Useful (1)