473,608 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2326
On 17 Jun, 11:46, "Álvaro G. Vicario"
<alvaroNOSPAMTH A...@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. htmlspecialchar s() or htmletities() doesn't help?
Jun 27 '08 #2
On Jun 17, 5:31Â*pm, matech <robert.mat...@ hotmail.co.ukwr ote:
On 17 Jun, 11:46, "Ãlvaro G. Vicario"

<alvaroNOSPAMTH A...@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. htmlspecialchar s() 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
2769
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 4.2. 3, not in safe mode. I think that the basic problem is the set-up for the temp folder, but I don't have access to the .ini settings. I'm pretty sure it's possible, because I've got MyPHPAdmin running, and
5
5459
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 replacing it with a button of my own background color and text. The file paths I'd like displayed in a textarea and then the files uploaded at once.
10
7387
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 recommend storing the image to the filesystem and only keeping a pointer to that in the table. I want to dump the image to a table. My code dumps the data into the table, however, I get the following error when trying to view the image "the image ......
13
4295
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 that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I cleanup files that were uploaded -- but obviously left stranded when the users aborted/gave up writting...
5
2713
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 more documents to share/use during a meeting presentation. What would be the most efficient way to approach this? This is the logic I'm currently considering: Page 1: Meeting Information input with link to a document upload page (this page...
2
3570
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 htmletities() doesn't help? the database doesn't show the data in the field but replaces it with the binary/Image information. the following are examples of how I've tried loading the data along with UTF-8 or iso-8859-1:
3
5169
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
2268
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 server side cgi creates a file, however it is blank, I don't see any errors in the log files (apache2/error.log) Below is my server side script !/usr/bin/perl -wT use strict; use CGI;
0
1820
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 files with data in native characters (Greek, Turkish, etc) have been prepared which are uploaded from Windows environment to the Linux server, however there is a problem as the Native characters are not uploaded correctly to Linux environment My...
0
8010
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8501
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8483
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8157
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6820
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6015
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4030
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2477
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.