歡迎您光臨本站 註冊首頁

如何解決SquirrelMail下載附件時,不能識別中文文件名

←手機掃碼閱讀     火星人 @ 2014-03-05 , reply:0

如何解決SquirrelMail下載附件時,不能識別中文文件名

如何解決SquirrelMail下載附件時,不能識別中文文件名?
這個問題已經煩了我N天了,請各位幫忙想想
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

沒什麼問題呀。
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

其它地方倒一切正常,就是下載附件時,如果是用中文命名的文件,則其文件名會變成亂碼,無法識別,偶實在是不知從何下手,謝謝各位了
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

你的SquirrelMail語言設置是什麼,改成簡體中文試試。
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

語言,ENCODING設置都沒錯,以下是我的配置文件,各位請看看

<?php
/**
* SquirrelMail Configuration File
* Created using the Administrator Plugin
*/

global $version;
$config_version = '1.4.0';
$org_name = "xxxxxx";
$org_logo = SM_PATH . 'images/sm_logo.png';
$org_logo_width = "308";
$org_logo_height = "111";
$org_title = "xxxxx";
$signout_page = '';
$provider_uri = "http://www.xxx.com.cn/";
$provider_name = "xxxxx";
$frame_top = "_top";
$domain = "xxx.xxx.xxx.xxxx";
$imapServerAddress = "localhost";
$imapPort = 143;
$imap_server_type = "courier";
$optional_delimiter = ".";
$use_imap_tls = FALSE;
$imap_auth_mech = "login";
$useSendmail = FALSE;
$sendmail_path = "/usr/sbin/sendmail";
$smtpServerAddress = "localhost";
$smtpPort = 25;
$use_smtp_tls = FALSE;
$smtp_auth_mech = "none";
$pop_before_smtp = FALSE;
$invert_time = FALSE;
$default_folder_prefix = "INBOX.";
$show_prefix_option = FALSE;
$trash_folder = "拉圾箱";
$sent_folder = "發信箱";
$draft_folder = "草稿箱";
$default_move_to_trash = TRUE;
$default_move_to_sent = TRUE;
$default_save_as_draft = TRUE;
$list_special_folders_first = TRUE;
$use_special_folder_color = TRUE;
$auto_expunge = TRUE;
$default_sub_of_inbox = FALSE;
$show_contain_subfolders_option = FALSE;
$default_unseen_notify = 2;
$default_unseen_type = 1;
$auto_create_special = TRUE;
$delete_folder = TRUE;
$noselect_fix_enable = FALSE;
$data_dir = SM_PATH . 'data/';
$attachment_dir = '/tmp';
$dir_hash_level = 0;
$default_left_size = 100;
$force_username_lowercase = FALSE;
$default_use_priority = TRUE;
$hide_sm_attributions = TRUE;
$default_use_mdn = TRUE;
$edit_identity = TRUE;
$edit_name = TRUE;
$allow_server_sort = FALSE;
$allow_thread_sort = FALSE;
$allow_charset_search = TRUE;
$uid_support = TRUE;
$session_name = 'SQMSESSID';
$motd = "xxx";
$addrbook_dsn = "mysql://xxx:xxxx@localhost/vpopmail";
$addrbook_table = "address";
$prefs_dsn = "mysql://xxx:xxxxx@localhost/vpopmail";
$prefs_table = "userprefs";
$prefs_user_field = "user";
$prefs_key_field = "prefkey";
$prefs_val_field = "prefval";
$addrbook_global_dsn = "mysql://xxxx:xxxxx@localhost/vpopmail";
$addrbook_global_table = "global_abook";
$addrbook_global_writeable = FALSE;
$addrbook_global_listing = TRUE;
$squirrelmail_default_language = 'zh_CN';
$default_charset = 'gb2312';
$lossy_encoding = FALSE;
$default_use_javascript_addr_book = FALSE;
$abook_global_file = "";
$abook_global_file_writeable = FALSE;
$theme_css = '/themes/css/style.css';
$theme_default = 8;
$config_use_color = 2;
$no_list_for_subscribe = FALSE;
$theme['PATH'] = SM_PATH . 'themes/default_theme.php';
$theme['NAME'] = 'Default';
$theme['PATH'] = SM_PATH . 'themes/plain_blue_theme.php';
$theme['NAME'] = 'Plain Blue';
$theme['PATH'] = SM_PATH . 'themes/sandstorm_theme.php';
$theme['NAME'] = 'Sand Storm';
$theme['PATH'] = SM_PATH . 'themes/deepocean_theme.php';
$theme['NAME'] = 'Deep Ocean';
$theme['PATH'] = SM_PATH . 'themes/slashdot_theme.php';
$theme['NAME'] = 'Slashdot';
$theme['PATH'] = SM_PATH . 'themes/purple_theme.php';
$theme['NAME'] = 'Purple';
$theme['PATH'] = SM_PATH . 'themes/forest_theme.php';
$theme['NAME'] = 'Forest';
$theme['PATH'] = SM_PATH . 'themes/ice_theme.php';
$theme['NAME'] = 'Ice';
$theme['PATH'] = SM_PATH . 'themes/seaspray_theme.php';
$theme['NAME'] = 'Sea Spray';
$theme['PATH'] = SM_PATH . 'themes/bluesteel_theme.php';
$theme['NAME'] = 'Blue Steel';
$theme['PATH'] = SM_PATH . 'themes/dark_grey_theme.php';
$theme['NAME'] = 'Dark Grey';
$theme['PATH'] = SM_PATH . 'themes/high_contrast_theme.php';
$theme['NAME'] = 'High Contrast';
$theme['PATH'] = SM_PATH . 'themes/black_bean_burrito_theme.php';
$theme['NAME'] = 'Black Bean Burrito';
$theme['PATH'] = SM_PATH . 'themes/servery_theme.php';
$theme['NAME'] = 'Servery';
$theme['PATH'] = SM_PATH . 'themes/maize_theme.php';
$theme['NAME'] = 'Maize';
$theme['PATH'] = SM_PATH . 'themes/bluesnews_theme.php';
$theme['NAME'] = 'BluesNews';
$theme['PATH'] = SM_PATH . 'themes/deepocean2_theme.php';
$theme['NAME'] = 'Deep Ocean 2';
$theme['PATH'] = SM_PATH . 'themes/blue_grey_theme.php';
$theme['NAME'] = 'Blue Grey';
$theme['PATH'] = SM_PATH . 'themes/dompie_theme.php';
$theme['NAME'] = 'Dompie';
$theme['PATH'] = SM_PATH . 'themes/methodical_theme.php';
$theme['NAME'] = 'Methodical';
$theme['PATH'] = SM_PATH . 'themes/greenhouse_effect.php';
$theme['NAME'] = 'Greenhouse Effect (Changes)';
$theme['PATH'] = SM_PATH . 'themes/in_the_pink.php';
$theme['NAME'] = 'In The Pink (Changes)';
$theme['PATH'] = SM_PATH . 'themes/kind_of_blue.php';
$theme['NAME'] = 'Kind of Blue (Changes)';
$theme['PATH'] = SM_PATH . 'themes/monostochastic.php';
$theme['NAME'] = 'Monostochastic (Changes)';
$theme['PATH'] = SM_PATH . 'themes/shades_of_grey.php';
$theme['NAME'] = 'Shades of Grey (Changes)';
$theme['PATH'] = SM_PATH . 'themes/spice_of_life.php';
$theme['NAME'] = 'Spice of Life (Changes)';
$theme['PATH'] = SM_PATH . 'themes/spice_of_life_lite.php';
$theme['NAME'] = 'Spice of Life - Lite (Changes)';
$theme['PATH'] = SM_PATH . 'themes/spice_of_life_dark.php';
$theme['NAME'] = 'Spice of Life - Dark (Changes)';
$theme['PATH'] = SM_PATH . 'themes/christmas.php';
$theme['NAME'] = 'Holiday - Christmas';
$theme['PATH'] = SM_PATH . 'themes/darkness.php';
$theme['NAME'] = 'Darkness (Changes)';
$theme['PATH'] = SM_PATH . 'themes/random.php';
$theme['NAME'] = 'Random (Changes every login)';
$theme['PATH'] = SM_PATH . 'themes/midnight.php';
$theme['NAME'] = 'Midnight';
$theme['PATH'] = SM_PATH . 'themes/alien_glow.php';
$theme['NAME'] = 'Alien Glow';
$theme['PATH'] = SM_PATH . 'themes/dark_green.php';
$theme['NAME'] = 'Dark Green';
$theme['PATH'] = SM_PATH . 'themes/penguin.php';
$theme['NAME'] = 'Penguin';
$theme['PATH'] = SM_PATH . 'themes/minimal_bw.php';
$theme['NAME'] = 'Minimal BW';
$theme['PATH'] = SM_PATH . 'themes/redmond.php';
$theme['NAME'] = 'Redmond';
$theme['PATH'] = SM_PATH . 'themes/netstyle_theme.php';
$theme['NAME'] = 'Net Style';
$plugins = 'abook_import_export';
$plugins = 'abook_take';
$plugins = 'admin_add';
$plugins = 'administrator';
$plugins = 'bug_report';
$plugins = 'calendar';
$plugins = 'change_pass';
$plugins = 'check_quota';
$plugins = 'compatibility';
$plugins = 'delete_move_next';
$plugins = 'filters';
$plugins = 'fortune';
$plugins = 'html_mail';
$plugins = 'info';
$plugins = 'listcommands';
$plugins = 'mail_fetch';
$plugins = 'message_details';
$plugins = 'newmail';
$plugins = 'sent_subfolders';
$plugins = 'spamcop';
$plugins = 'squirrelspell';
$plugins = 'templates';
$plugins = 'translate';
$plugins = 'virus_scan';
?>;
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

再補充一點,其它地方都可以正常的顯示及支持中文,就是下載附件時,如果附件名稱含有中文,那麼下載下來的文件名就會變為亂碼
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

沒人曾碰過類似的問題嗎
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

好象是IMAP 中的一個文件有中文文件名字處理BUG
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

在瀏覽那個網頁時,用右鍵看看你的瀏覽器使用的編碼是什麼?

是UTF-8還是簡體中文。

然後再確定下一步應該怎麼做吧。

如果是UTF-8,那麼就使用PHP的iconv函數進行轉碼吧。
echo iconv("GB2312","UTF-8",$str);
《解決方案》

如何解決SquirrelMail下載附件時,不能識別中文文件名

我覺得是IMAP中的錯誤,也可能你們用高版本已經改好了。

請大家試驗自己的有無問題。

[火星人 ] 如何解決SquirrelMail下載附件時,不能識別中文文件名已經有698次圍觀

http://coctec.com/docs/service/show-post-44982.html