Uploading file with PHP having Cyrillic characters

  • Tannu4u
  • Proficient
  • Proficient
  • User avatar
  • Posts: 480
  • Loc: India

Post 3+ Months Ago

Hi All,
I am working on uploading a file having cyrillic names.
For example "Пермойл.pdf" after uploading and using the move_uploaded_file() function the filename on the filesystem is changed to
Code: [ Select ]
"&#1055ермойл.pdf"


Can anyone suggest how to have the same name on the filesystem as well?

Thanks in advance

Amit
  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1244
  • Loc: Sydney

Post 3+ Months Ago

Code: [ Select ]
$value = mb_convert_encoding($value, "UTF-8");


:)
======

Further reference:
http://php.net/manual/en/reserved.variables.files.php
http://forum.virtuemart.net/index.php?topic=99134.0
  • Tannu4u
  • Proficient
  • Proficient
  • User avatar
  • Posts: 480
  • Loc: India

Post 3+ Months Ago

I have tried lots of thing but the filename is automatically converted to the other text
  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1244
  • Loc: Sydney

Post 3+ Months Ago

could you convert the string and change the name with a prefix or something.

filename.pdf = 5123.pdf

idk if this would even work if the PHP does not like it. But can you chang ethe file name on file_create and then have a name in a html/js form or something. there would be a way to do this.

hhmm could you write a language pack so the words can be identified by variable. lol idk lets hope there is something similar someone has all ready started.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: Liamw411 and 127 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.