Roundcube Community Forum

Release Support => Pending Issues => Topic started by: kimura on September 09, 2016, 10:49:25 PM

Title: Japanese attachment filename garbled when sending
Post by: kimura on September 09, 2016, 10:49:25 PM
filename was garbled when I attach for sending.
any ideas?

Roundcube Webmail 1.2.1
PHP 5.4.16
http://imgur.com/r54qVFX (http://imgur.com/r54qVFX)
Title: Re: Japanese attachment filename garbled when sending
Post by: alec on September 10, 2016, 02:38:47 AM
So it is garbled only in the compose form? Could you provide the filename here as a text, so I can create such a file in my system and test this?
Title: Re: Japanese attachment filename garbled when sending
Post by: kimura on September 10, 2016, 02:51:03 PM
Quote from: alec on September 10, 2016, 02:38:47 AM
So it is garbled only in the compose form? Could you provide the filename here as a text, so I can create such a file in my system and test this?
attachment filename is "あいう.txt"

compose form - "あいう.txt"
INBOX(from roundcube) - "あいう.txt"
INBOX(from other mail system) - "あいう.txt"

I cannot judge whether my system configuration is wrong or not.
Title: Re: Japanese attachment filename garbled when sending
Post by: alec on September 11, 2016, 02:45:49 PM
But your screenshot shows correct filename in mail preview. So, I'm confused. Anyway, I can't reproduce. This may be browser-specific or server-specific or client-OS-specific. So, try with another browser, try with disabled plugins. If this does not help, you'd need to debug in the code.
Title: Re: Japanese attachment filename garbled when sending
Post by: kimura on September 11, 2016, 06:20:22 PM
Quote from: alec on September 11, 2016, 02:45:49 PM
But your screenshot shows correct filename in mail preview. So, I'm confused. Anyway, I can't reproduce. This may be browser-specific or server-specific or client-OS-specific. So, try with another browser, try with disabled plugins. If this does not help, you'd need to debug in the code.
I wanted to show that a received mail through other system is correct. I'm sorry for confusing you.

I already tried Chrome, IE and Edge. Results are no change.
and already encoded mail by other system (=forwarding mail) shows correct filename. so I think this is my server side issue.
Thank you for the information.
Title: Re: Japanese attachment filename garbled when sending
Post by: kimura on September 11, 2016, 10:05:48 PM
I solved this issue. Thanks.

http://php.net/manual/en/mbstring.http.php (http://php.net/manual/en/mbstring.http.php)
Title: Re: Japanese attachment filename garbled when sending
Post by: alec on September 12, 2016, 02:23:20 AM
mbstring is a requirement in 1.2, so did you just install it or it was some configuration "broken"?
Title: Re: Japanese attachment filename garbled when sending
Post by: kimura on September 12, 2016, 06:48:22 AM
Beginning with PHP 4.3.3, if enctype for HTML form is set to multipart/form-data and mbstring.encoding_translation is set to On in php.ini the POST'ed variables and [b]the names of uploaded files will be converted to the internal character encoding[/b] as well.
PHP got me. I changed mbstring.http_input = "auto" to "pass". It works fine.