View Issue Details

IDProjectCategoryView StatusLast Update
0000375fileGeneralpublic2022-08-18 08:08
ReporterDC Assigned Tochristos  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSGentooOS VersionLatest
Product Version5.42 
Fixed in Version5.43 
Summary0000375: Broken output for national characters
DescriptionSince version 5.42 the file command doesn't output correctly files with national characters in the path:

$ file -v
file-5.42
magic file from /usr/share/misc/magic
seccomp support included
$ file /tmp/ěščřžýáíé/file.txt
/tmp/\304\233\305\241\304\215\305\231\305\276\303\275\303\241\303\255\303\251: ASCII text

File version 5.41 is working fine:
$ file -v
file-5.41
magic file from /usr/share/misc/magic
seccomp support included
$ file /tmp/ěščřžýáíé/file.txt
/tmp/ěščřžýáíé/file.txt: ASCII text

My locales are:
LANG=cs_CZ.UTF-8
LC_ALL=cs_CZ.UTF-8
Steps To ReproduceRun the file command on file with national characters in the path.
Tagsbug, filename

Activities

christos

2022-08-17 08:56

manager   ~0003800

How do you reproduce it?
bash-3.2$ touch /tmp/ěščřžýáíéfile.txt
bash-3.2$ ./file -m ../magic/magic.mgc /tmp/*.txt
/tmp/ěščřžýáíéfile.txt: empty
bash-3.2$ file -v
file-5.42
magic file from /usr/local/share/misc/magic

lilydjwg

2022-08-18 04:17

reporter   ~0003802

I get this issue with Chinese characters too.
christos, you checked the version of a wrong file binary?

christos

2022-08-18 06:40

manager   ~0003803

I am running with the version from the HEAD of the tree which is different. Can you try that?

DC

2022-08-18 08:05

reporter   ~0003805

I confirm that when I build the file binary from latest sources then everything seems to be working fine again!

christos

2022-08-18 08:08

manager   ~0003806

Great, let me close this and plan for a new release! Thanks for testing.

Issue History

Date Modified Username Field Change
2022-08-08 18:07 DC New Issue
2022-08-08 18:07 DC Tag Attached: bug
2022-08-08 18:07 DC Tag Attached: filename
2022-08-17 08:56 christos Assigned To => christos
2022-08-17 08:56 christos Status new => assigned
2022-08-17 08:56 christos Status assigned => feedback
2022-08-17 08:56 christos Note Added: 0003800
2022-08-18 04:17 lilydjwg Note Added: 0003802
2022-08-18 06:40 christos Note Added: 0003803
2022-08-18 08:05 DC Note Added: 0003805
2022-08-18 08:05 DC Status feedback => assigned
2022-08-18 08:08 christos Status assigned => resolved
2022-08-18 08:08 christos Resolution open => fixed
2022-08-18 08:08 christos Fixed in Version => 5.43
2022-08-18 08:08 christos Note Added: 0003806