1 (edited by spectral 2012-01-27 17:55:06)

Topic: German characters ÄÖÜäöüß get lost

Hi!

Please help! I'm trying to integrate the plupload jQuery queue widget in a website. Unfortunately the german characters ÄÖÜäöüß are replaced in the file Name on the Server with Ã_ . I suppose this is because the Website is charset=iso-8859-1 and the webserver utf-8 ??? I cannot change the charset of the html, beause all MySQL Data of the CMS would be displayed wrong. Anyway I tried it and it din't solve the problem.

Then I tried to insert q.setRequestHeader("charset", "utf-8"); in the plupload.full.js in the html5-section after q.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + N); and q.setRequestHeader("Content-Type", "application/octet-stream");. But nothing changed.

The filename in the Queue ist displayed correctly and file.name is okay. The $fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : ''; receaved by upload.php is bad.

I also tried to insert  header('Content-type: text/plain; charset=UTF-8'); in my upload.php - same problem.

What shoud I try?

plupload: 1.5.2
1.5.1/jquery.min.js
Firefox9 Vista and IE9 Vista

Re: German characters ÄÖÜäöüß get lost

A few days later ...

I found a solution here:
http://swfupload.org/forum/generaldiscussion/526

So what I did, is:

The page with plupload on it and generated by a cms is: iso-8859-1.

The Webserver is: utf-8

The uploader.php:

header("Content-Type: text/html; charset=UTF-8");

and:

$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
$fileName = utf8_decode($fileName); //convert iso-8859-1 filenames to utf-8

// Clean the fileName for security reasons
$fileName = preg_replace('/[^\w\._-]+/', '_', $fileName);

Maybe this helps someone....

3 (edited by sourcerer 2012-05-24 17:03:19)

Re: German characters ÄÖÜäöüß get lost

plupload: 1.5.4

I have the same problem. The filename in $_REQUEST['name'] has corrupt characters. converting to utf8 ends in an empty string.

Is their any way to configure plupload to use utf-8? or to encode the filename before submitting?

Re: German characters ÄÖÜäöüß get lost

I can confirm that I have the same issues with db, website and forms encoded as UTF-8.

So again, how can I subscribe to this topic? Don't see any link here.
Which version is this PunBB? From 2004?
Is anyone from Moxiecode/plupload reading the forum at all?