Opened 4 years ago

Closed 4 years ago

#60065 closed defect (invalid)

coreutils @8.31: ls break with non-ASCII filename

Reported by: FranklinYu (Franklin Yu) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: coreutils

Description (last modified by FranklinYu (Franklin Yu))

To reproduce: create a file called á.txt then list it with ls. Tried building locally from source, problem persists. I’m on Catalina, but this issue also affects my Mojave machine.

My guess is that binary package for libiconv is broken, but I don’t know how to verify this.

Change History (8)

comment:1 Changed 4 years ago by FranklinYu (Franklin Yu)

Port: coreutils added

comment:2 Changed 4 years ago by FranklinYu (Franklin Yu)

Owner: set to ryandesign
Status: newassigned

This port doesn’t have maintainer, so I’m assigning this to Ryan, the maintainer of libiconv to see whether he has some idea to verify that port.

comment:3 Changed 4 years ago by FranklinYu (Franklin Yu)

Description: modified (diff)

comment:4 in reply to:  description Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

I don't have time to look into this, but perhaps you could tell us:

Replying to FranklinYu:

To reproduce: create a file called á.txt then list it with ls.

What happens when you do this?

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: ryandesign deleted

comment:6 Changed 4 years ago by jmroot (Joshua Root)

% gls á.txt 
á.txt

Conversation on IRC suggests that the problem was due to incorrect locale settings. Can this ticket be closed?

comment:7 Changed 4 years ago by FranklinYu (Franklin Yu)

Yes, please close this ticket as invalid, Joshua. It’s indeed locale configuration issue. Sorry for noise.

root cause (optional reading)

The root reason is that I set "language" to Chinese (because I want to see UI show in Chinese), while "location" to United States (because I’m currently living in California). I thought that the location only affects date format, which was wrong. The combination of language and location decides $LANG, which is the base of the entire locale system. My $LC_CTYPE set to UTF-8 is simply a side effect of missing $LANG, and the behavior is shared between iTerm2 and Terminal.app.

Conclution: there is nothing broken, and everything (MacPorts, iTerm2, Terminal.app, and macOS) works as intended. It’s me. I fixed myself.

Last edited 4 years ago by FranklinYu (Franklin Yu) (previous) (diff)

comment:8 Changed 4 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: assignedclosed
Note: See TracTickets for help on using tickets.