First character missing on import

When importing a file that contains extended characters like óéí and other like that it can happen that these characters are missing on import when they are the first character. For example the word Østerrike is imported as sterrike.

This is not a bug in CSVI but a misconfiguration on your server. The server needs to use the UTF-8 locale to be able to identify these characters, any other locale will cause this failure. To fix this, you will most likely need to ask your hosting provider as it is a change on the server.

A temporary work-around that can be used is to use the PHP function setlocale. To do that you need to find out what locales are available on your server. This can be done by opening an SSH session to your server and execute the comamnd:

locale -a

Let's say you find your locale to be nl_NL.utf8. You can change the encoding by adding this code to the administrator/components/com_csvivirtuemart/csvivirtuemart.php file or administrator/components/com_csvi/csvi.php:

setlocale(LC_ALL, 'nl_NL.utf8');

This is best placed after the line:

defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );