Project

General

Profile

Actions

Bug #2871

closed

lastname first name with accents

Added by dominique de guchtenaere over 12 years ago. Updated almost 12 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
Actions #1

Updated by Sven Vanpoucke over 12 years ago

Is your upload file in utf-8 encoded?

Actions #2

Updated by Ivan Tcholakov over 12 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.

Actions #3

Updated by Stefaan Vanbillemont over 12 years ago

  • Target version set to 21
Actions #4

Updated by Stefaan Vanbillemont about 12 years ago

  • Project changed from Chamilo LCMS Connect to Repository
Actions #5

Updated by Stefaan Vanbillemont about 12 years ago

  • Target version changed from 21 to 2.1.0
Actions #6

Updated by Anonymous about 12 years ago

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

Updated by Anonymous about 12 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.

Actions #8

Updated by Anonymous about 12 years ago

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

Updated by Koen Favere almost 12 years ago

  • Status changed from Needs testing to Bug resolved
Actions

Also available in: Atom PDF