Project

General

Profile

Bug #2871

lastname first name with accents

Added by dominique de guchtenaere over 9 years ago. Updated about 9 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
-
Target version:
Start date:
15/02/2011
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal

Description

When I upload a csv file to add users to the system, the names are cut off when there is a letter with accent in the name.
ex. Quitério becomes: Quit (see attachment)

The system accepts letters with accents, because in the user list I can type/edit the name correctly.

This occurs on every testplatform, also the most recent version localy installed.


Files

letters_met_accenten.jpg (3.23 KB) letters_met_accenten.jpg dominique de guchtenaere, 15/02/2011 12:36

History

#1

Updated by Sven Vanpoucke over 9 years ago

Is your upload file in utf-8 encoded?

#2

Updated by Ivan Tcholakov over 9 years ago

Sven,

Probably you use the native PHP functions str_getcsv() (http://php.net/manual/en/function.str-getcsv.php) and fgetcsv() (http://php.net/manual/en/function.fgetcsv.php). These functions are not convenient, because they depend on OS locale. When OS locale is not UTF-8 (in Windows for example) these functions cut all non-ASCII letters. However OS system locale should not be changed, because it is not thread-safe.

In Chamilo 1.8.x we use alternative php-implemented functions. See in chamilo-classic/main/inc/lib/text.lib.php the functions api_str_getcsv() and api_fgetcsv(). They work with UTF-8 (and other encodings) correctly.

#3

Updated by Stefaan Vanbillemont over 9 years ago

  • Target version set to 21
#4

Updated by Stefaan Vanbillemont over 9 years ago

  • Project changed from Chamilo LCMS Connect to Repository
#5

Updated by Stefaan Vanbillemont about 9 years ago

  • Target version changed from 21 to 2.1.0
#6

Updated by Anonymous about 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Anonymous
#7

Updated by Anonymous about 9 years ago

  • Status changed from Assigned to Needs more info

I can only make up that your file is not UTF-8. When I try to import a CSV file exported by chamilo, the file format is UTF-8 according to Notepad++. When I import this file everything works like a charm. If I use Notepad++ to convert the CSV file to ANSI, the name gets cut off on a second import.

Can you try to check the encoding of your CSV file? In Notepad++ you have a separate menu for this where you can convert the file as well, give this a go and provide some feedback for this issue so we can look further into it if necessary.

#8

Updated by Anonymous about 9 years ago

  • Status changed from Needs more info to Needs testing
  • % Done changed from 0 to 100
#9

Updated by Koen Favere about 9 years ago

  • Status changed from Needs testing to Bug resolved

Also available in: Atom PDF