473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Re: Uploading files with speical characters....

jodleren escribió:
I work on s system, which is based on one.com (Denmark) - and used
elsewhere, in my case in the baltics.
When uploading files, there is problem with Lativian characters - the
e with overscore (e with a line above; ē )

The problem is, that when uploading, it changes the "e" to the html
code:

echo "\r\n10- ".$_FILES["newfile_$i"]['name']."<br>";
result:
whatever_ē.pdf
I haven't found the PHP manual page where such feature is documented but
a few tests have shown that this behaviour changes depending on the
charset parameter of the "Content-Type" HTTP header; even if I don't set
an actual HTTP header and I just use a <metatag:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

With a packet sniffer I've determined that it's not the browser who
changes it. If you write into a file the entities are still there, so it
doesn't seem to be an Apache feature. It's really weird.

If it's not feasible to change your encoding to UTF-8, well, I don't
know what you can do...
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Jun 27 '08 #1
2 2303
On 17 Jun, 11:46, "Álvaro G. Vicario"
<alvaroNOSPAMTHA...@demogracia.comwrote:
jodleren escribió:
I work on s system, which is based on one.com (Denmark) - and used
elsewhere, in my case in the baltics.
When uploading files, there is problem with Lativian characters - the
e with overscore (e with a line above; ē )
The problem is, that when uploading, it changes the "e" to the html
code:
echo "\r\n10- ".$_FILES["newfile_$i"]['name']."<br>";
result:
whatever_ē.pdf

I haven't found the PHP manual page where such feature is documented but
a few tests have shown that this behaviour changes depending on the
charset parameter of the "Content-Type" HTTP header; even if I don't set
an actual HTTP header and I just use a <metatag:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

With a packet sniffer I've determined that it's not the browser who
changes it. If you write into a file the entities are still there, so it
doesn't seem to be an Apache feature. It's really weird.

If it's not feasible to change your encoding to UTF-8, well, I don't
know what you can do...

--
--http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://bits.demogracia.com
-- Mi web de humor al baño María:http://www.demogracia.com
--
I have the same problem but with uploading excel files to mysql 5. It
doesn't matter if I use UTF-8 or iso-8859-1 and uploading the
trademark symbol. htmlspecialchars() or htmletities() doesn't help?
Jun 27 '08 #2
On Jun 17, 5:31Â*pm, matech <robert.mat...@hotmail.co.ukwrote:
On 17 Jun, 11:46, "Ãlvaro G. Vicario"

<alvaroNOSPAMTHA...@demogracia.comwrote:
jodleren escribió:
I work on s system, which is based on one.com (Denmark) - and used
elsewhere, in my case in the baltics.
When uploading files, there is problem with Lativian characters - the
e with overscore (e with a line above; Ä“ )
The problem is, that when uploading, it changes the "e" to the html
code:
echo "\r\n10- ".$_FILES["newfile_$i"]['name']."<br>";
result:
whatever_Ä“.pdf
I haven't found the PHP manual page where such feature is documented but
a few tests have shown that this behaviour changes depending on the
charset parameter of the "Content-Type" HTTP header; even if I don't set
an actual HTTP header and I just use a <metatag:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
With a packet sniffer I've determined that it's not the browser who
changes it. If you write into a file the entities are still there, so it
doesn't seem to be an Apache feature. It's really weird.
If it's not feasible to change your encoding to UTF-8, well, I don't
know what you can do...
--
--http://alvaro.es-Ãlvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://bits.demogracia.com
-- Mi web de humor al baño MarÃ*a:http://www.demogracia.com
--

I have the same problem but with uploading excel files to mysql 5. It
doesn't matter if I use UTF-8 or iso-8859-1 and uploading the
trademark symbol. htmlspecialchars() or htmletities() doesn't help?- Hidequoted text -
I tried some of these, no luck.

I made a replace for known letters ( e.g. ē =e ) end for the
rest I just replace them with _ (underscore)
That way I can avoid any problems.
I am just wondering when they start using russian letters in
filenames... hope they wont

/S
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: dickiedyce | last post by:
Hi there. I've spent the weekend getting ever more frustrated, trying to get an upload file function working on a website. The site is hosted by a company called oneandone. They're using PHP...
5
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
10
by: John Smith | last post by:
I know that uploading an image to a database has been covered, oh, about 3 trillion times. However, I haven't found anything covering uploading to a MySQL database with .net. Please don't...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
5
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
2
by: matech | last post by:
I have a problem with uploading special characters from excel files to mysql 5. It doesn't matter if I use UTF-8 or iso-8859-1 when uploading the trademark ™ symbol. htmlspecialchars() or...
3
by: muziburrehaman | last post by:
i am looking for code in php to upload the 1 gb files. any one can please help me by sending the code....
11
by: starter08 | last post by:
Hi, I have a C++ function which sends a post request to a server for uploading a file. I have also written a server side cgi to receive the data and create the file in a specified directory. The...
0
by: mnshzz | last post by:
I am working on Project where there is a requirement to transliterated the native characters (Greek, Turkish, Russian) into English on the Linux RH enterprise V4 server. As part of the SIT, txt...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.