Garbage characters on directory and/or file name March 16, 2018 06:49PM |
Registered: 11 years ago Posts: 1,303 |
[root@debian:/root 3%] # ls -la /srv/ total 12 drwxr-xr-x 3 root root 4096 Mar 15 22:34 . drwxr-xr-x 21 root root 4096 Feb 16 2015 .. drwxr-xr-x 2 nobody nogroup 4096 Mar 16 13:05 ???????????? [root@debian:/root 4%] # ls -la /srv/\347\273\247\347\210\266\345\233\236\345\256\266/ total 876960 drwxr-xr-x 2 nobody nogroup 4096 Mar 16 13:05 . drwxr-xr-x 3 root root 4096 Mar 15 22:34 .. -rw-r--r-- 1 nobody nogroup 178467784 Feb 15 19:15 ?????????.mp4 -rw-r--r-- 1 nobody nogroup 180803541 Feb 15 21:18 ?????????.mp4 -rw-r--r-- 1 nobody nogroup 182210980 Mar 15 22:32 ?????????.mp4 -rw-r--r-- 1 nobody nogroup 177843368 Feb 15 22:20 ?????????.mp4 -rw-r--r-- 1 nobody nogroup 178652002 Feb 16 11:56 ?????????.mp4 [root@debian:/root 5%] #OTOH, this does not happen when I tried the same thing on my OpenSuSE Linux desktop computer (see below). Is there a package I must install to remedy this issue?
[habibie@linux:/mnt/exports/devel/openwrt-git-trunk 276%] ~ ls -la /mnt/ total 12 drwxr-xr-x 3 root root 4096 Mar 15 22:34 . drwxr-xr-x 23 root root 4096 Sep 9 2017 .. drwxr-xr-x 2 nobody nogroup 4096 Mar 16 13:05 继父回家 [habibie@linux:/mnt/exports/devel/openwrt-git-trunk 277%] ~ ls -la /mnt/继父回家/ total 876960 drwxr-xr-x 2 nobody nogroup 4096 Mar 16 13:05 . drwxr-xr-x 3 root root 4096 Mar 15 22:34 .. -rw-r--r-- 1 nobody nogroup 178467784 Feb 15 19:15 第一集.mp4 -rw-r--r-- 1 nobody nogroup 180803541 Feb 15 21:18 第三集.mp4 -rw-r--r-- 1 nobody nogroup 182210980 Mar 15 22:32 第二集.mp4 -rw-r--r-- 1 nobody nogroup 177843368 Feb 15 22:20 第五集.mp4 -rw-r--r-- 1 nobody nogroup 178652002 Feb 16 11:56 第四集.mp4 [habibie@linux:/mnt/exports/devel/openwrt-git-trunk 278%] ~
Re: Garbage characters on directory and/or file name March 16, 2018 08:02PM |
Registered: 9 years ago Posts: 226 |
Re: Garbage characters on directory and/or file name March 16, 2018 10:12PM |
Admin Registered: 13 years ago Posts: 18,570 |
How to enable UTF-8 for different languages in your system March 17, 2018 02:18AM |
Admin Registered: 13 years ago Posts: 18,570 |
apt-get install locales
# This file lists locales that you wish to have built. You can find a list # of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add # user defined locales to /usr/local/share/i18n/SUPPORTED. If you change # this file, you need to rerun locale-gen. <snip> en_US.UTF-8 UTF-8
locale-genOutput:
Generating locales (this might take a while)... en_US.UTF-8... done Generation complete.
echo "export LANG=en_US.UTF-8" > ~/.utf8
# ~/.profile: executed by Bourne-compatible login shells. <snip> . ~/.utf8
apt-get install xfonts-efont-unicode apt-get install xfonts-efont-unicode-ib
Re: Garbage characters on directory and/or file name March 17, 2018 08:14AM |
Registered: 11 years ago Posts: 1,303 |
Re: Garbage characters on directory and/or file name March 17, 2018 08:15AM |
Registered: 11 years ago Posts: 1,303 |
[root@debian:/root 28%] # locale-gen Generating locales (this might take a while)... Generation complete. [root@debian:/root 29%] # ls -la total 40 drwx------ 5 root root 4096 Mar 17 08:47 . drwxr-xr-x 21 root root 4096 Feb 16 2015 .. -rw-r--r-- 1 root root 570 Jan 31 2010 .bashrc drwx------ 3 root root 4096 Jun 14 2013 .config drwxr-xr-x 2 root root 4096 Jul 23 2017 .nano -rw-r--r-- 1 root root 481 Jul 20 2017 .profile drwx------ 2 root root 4096 Jul 23 2017 .ssh -rw------- 1 root root 9484 Mar 17 08:47 .viminfo [root@debian:/root 30%] #
[root@debian:/root 26%] # apt-get install psmisc Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: psmisc 0 upgraded, 1 newly installed, 0 to remove and 174 not upgraded. Need to get 113 kB of archives. After this operation, 532 kB of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian buster/main armel psmisc armel 23.1-1 [113 kB] Fetched 113 kB in 0s (123 kB/s) perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_TIME = "en_US.UTF-8", LC_MONETARY = "en_US.UTF-8", LC_COLLATE = "en_US.UTF-8", LC_MEASUREMENT = "en_US.UTF-8", LC_NUMERIC = "en_US.UTF-8", LANG = "C" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_ALL to default locale: No such file or directory Selecting previously unselected package psmisc. (Reading database ... 21696 files and directories currently installed.) Preparing to unpack .../psmisc_23.1-1_armel.deb ... Unpacking psmisc (23.1-1) ... Setting up psmisc (23.1-1) ... Processing triggers for man-db (2.7.6.1-2) ... 10.844u+1.908s=0:34.70e(36.7%) TDSavg=0k+0k+0k max=81664k 160584+80184io 121pf+0sw [root@debian:/root 27%] #
Re: Garbage characters on directory and/or file name March 17, 2018 08:32AM |
Registered: 11 years ago Posts: 1,303 |
[root@debian:/root 6%] # dpkg-reconfigure locales Package configuration ┌────────────────────────────────────────────────────Configuring locales───────────────────────────────────────────────────────┐─ │ Locales are a framework to switch between multiple languages and allow users to use their language, country, characters, │ │ collation order, etc. │ │ │ Please choose which locales to generate. UTF-8 locales should be chosen by default, particularly for new installations. │ │ Other character sets may be useful for backwards compatibility with older systems and software. │ │ │ Locales to be generated: │ │ ┌───────────────────────────────────────────────↑(-)───────────────────────────────────────────────────────────────────────┐ │ │ │ [ ] en_US.ISO-8859-15 ISO-8859-15 │ │ │ │ [*] en_US.UTF-8 UTF-8 │ │ │ │ [ ] en_ZA ISO-8859-1 │ │ │ │ [ ] en_ZA.UTF-8 UTF-8 │ │ │ │ [ ] en_ZM UTF-8 │ │ │ │ [ ] en_ZW ISO-8859-1 │ │ │ │ [ ] en_ZW.UTF-8 UTF-8 │ │ │ └───────────────────────────────────────────────↓(+)───────────────────────────────────────────────────────────────32%─────┘ │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ < OK > <Cancel> │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ Package configuration ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ┌────────────────────────────────────────────────────Configuring locales───────────────────────────────────────────────────────┐ │ Many packages in Debian use locales to display text in the correct language for the user. You can choose a default locale │ │ for the system from the generated locales. │ │ │ This will select the default language for the entire system. If this system is a multi-user system where not all users │ │ are able to speak the default language, they will experience difficulties. │ │ │ Default locale for the system environment: │ │ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ [ ] None │ │ │ │ [ ] C.UTF-8 │ │ │ │ [*] en_US.UTF-8 │ │ │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ < OK > <Cancel> │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ Generating locales (this might take a while)... en_US.UTF-8... done Generation complete. 14.661u+2.684s=0:43.05e(40.2%) TDSavg=0k+0k+0k max=64212k 512+5744io 14pf+0sw [root@debian:/root 7%] # dir /srv/ total 4 drwxr-xr-x 2 nobody nogroup 4096 Mar 16 13:05 继父回家 [root@debian:/root 8%] # dir /srv/继父回家/ total 876952 -rw-r--r-- 1 nobody nogroup 178467784 Feb 15 19:15 第一集.mp4 -rw-r--r-- 1 nobody nogroup 180803541 Feb 15 21:18 第三集.mp4 -rw-r--r-- 1 nobody nogroup 182210980 Mar 15 22:32 第二集.mp4 -rw-r--r-- 1 nobody nogroup 177843368 Feb 15 22:20 第五集.mp4 -rw-r--r-- 1 nobody nogroup 178652002 Feb 16 11:56 第四集.mp4 [root@debian:/root 9%] #
Re: Garbage characters on directory and/or file name March 17, 2018 01:45PM |
Registered: 9 years ago Posts: 226 |
Re: Garbage characters on directory and/or file name March 17, 2018 04:32PM |
Admin Registered: 13 years ago Posts: 18,570 |