Bug #1515

Can't upload document with UTF-8 characters to windows server

Added by remi over 11 years ago. Updated over 11 years ago.

Status:ClosedStart date:08/22/2009
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:Management
Target version:0.72.2

Description

See : http://www.glpi-project.org/forum/viewtopic.php?id=16252

UTF-8 characters seems not stored to NTFS filesystem and not stored in DB.

Associated revisions

Revision 8776
Added by remi over 11 years ago

new cleanFilenameDocument - should fixed #1515 (if mbstring available)

History

#1 Updated by remi over 11 years ago

Proposition : au début de cleanFilenameDocument

$name = mb_convert_encoding($name,'HTML-ENTITIES','UTF-8');

ça fait des noms à rallonge, mais ça doit passer dans toutes les locales possibles.

+

#2 Updated by remi over 11 years ago

Other solution :

if (function_exists('mb_convert_case')) {
  return mb_convert_case($name,MB_CASE_LOWER,"UTF-8");
} 
return strtolower($name);

It seems strtolower could return an invalid UTF-8 which is truncated by MySQL in STRICT mode under Windows.

1st solution seams usefull too as using UTF-8 file name under windows result in a not readable directory.

#3 Updated by remi over 11 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset r8776.

Also available in: Atom PDF