• narita2015

    (@narita2015)


    When receiving an attachment with a Japanese filename, the Japanese characters completely disappear (“ใƒ†ใ‚นใƒˆ.pdf” becomes “.pdf”)

    However, if the attached filename begins with an English character, the Japanese will show (test_ใƒ†ใ‚นใƒˆ.pdf works fine)

    How can I make the filename in Japanese not disappear?

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter narita2015

    (@narita2015)

    *additional note: Japanese and Chinese characters disappear from the file name sent from Contact Form 7

    Andrey

    (@aegozov)

    I’ve got the same problem with Russian Cyrillic filenames.

    I found that this plugin make additional filename processing after using wordpress internal function sanitize_file_name().

    It cleans all non latin symbols.

    So if you don’t want to patch this plugin php-code you should use one more plugin or manually written php-function that can convert you japanese filename into latin symbols or numbers.

    Here are some, that I’ve found.
    https://www.ads-software.com/plugins/wp-hash-filename/screenshots/
    https://www.ads-software.com/plugins/wp-upload-rename/screenshots/

    It kills sense of course, but its better anyway then getting empty “.pdf” or “.jpg” filename.

    Andrey

    (@aegozov)

    you can also read this topic
    https://www.ads-software.com/support/topic/cyrillic-filename-problem?replies=20

    As I can see from this code

    function wpcf7_canonicalize( $text ) {
    	if ( function_exists( 'mb_convert_kana' )
    	&& 'UTF-8' == get_option( 'blog_charset' ) ) {
    		$text = mb_convert_kana( $text, 'asKV', 'UTF-8' );
    	}
    
    	$text = strtolower( $text );
    	$text = trim( $text );
    	return $text;
    }

    It seems that this plugin should work with kana right way
    So may be you have similar problem with locale on your server as described.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Attachment with Japanese file name doesn't show’ is closed to new replies.