Author Topic: Japanese attachment filename garbled when sending  (Read 5245 times)

Offline kimura

  • Newbie
  • *
  • Posts: 5
Japanese attachment filename garbled when sending
« 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

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Japanese attachment filename garbled when sending
« Reply #1 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?

Offline kimura

  • Newbie
  • *
  • Posts: 5
Re: Japanese attachment filename garbled when sending
« Reply #2 on: September 10, 2016, 02:51:03 PM »
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.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Japanese attachment filename garbled when sending
« Reply #3 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.

Offline kimura

  • Newbie
  • *
  • Posts: 5
Re: Japanese attachment filename garbled when sending
« Reply #4 on: September 11, 2016, 06:20:22 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.
  • roundcube(garbled) -> send -> roundcube(garbled)
  • roundcube(garbled) -> send -> gmail(garbled)
  • gmail(correct) -> send -> roundcube(correct)
  • gmail(correct) -> send -> roundcube(correct) -> forward -> roundcube(correct)

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.

Offline kimura

  • Newbie
  • *
  • Posts: 5
Re: Japanese attachment filename garbled when sending
« Reply #5 on: September 11, 2016, 10:05:48 PM »
I solved this issue. Thanks.

http://php.net/manual/en/mbstring.http.php

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Japanese attachment filename garbled when sending
« Reply #6 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"?

Offline kimura

  • Newbie
  • *
  • Posts: 5
Re: Japanese attachment filename garbled when sending
« Reply #7 on: September 12, 2016, 06:48:22 AM »
Code: [Select]
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.