An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Page 3 of 3 < 1 2 3
Topic Options
#32859 - 01/31/15 09:56 PM Re: Removing an App [Re: ganbustein]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
Unfortunately, the downside with this strange deception (other than, of course, a certain confusion when one compares different versions of Disk Utility, some of which say the trash is /Trash and some of which say it's /.Trash--neither of which is actually the case) is if you have an actual folder named Trash on the root level of your hard drive...in which case, God help you.

And yes, you can do it. I checked.
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#32861 - 01/31/15 10:40 PM Re: Removing an App [Re: tacit]
ganbustein Offline


Registered: 08/04/09
Not really a problem, beyond the usual "Once we practice to deceive..." admonition. The "/Trash" that Disk Utility and/or Finder shows is a phantom folder, never reachable by that path. Since you can never reach the phantom folder using its path, it can never be confused with a real folder that actually is at that path.

But if you don't want your computer lying to you, abjure Finder and the rest of the GUI, and go straight to Terminal. The command line never lies to you. (Well, almost never. Files whose owner or group equals 99 will always appear to belong to you or your group, respectively. Unless you're root. Nobody lies to root.)

This is not the only deception Finder pulls. It localizes the names of many folders and applications based on your preferred language. Again, the names are changed only as reported by Finder. Under the hood, the real names are unchanged, and at the command line you always see truth.

Finder lies through its teeth when showing you permissions. I don't think it's malice. It's just incompetence. From the Get Info window, it's hopeless to try to figure out what a file's permissions actually are, and changes you make through Get Info are unpredictable.

Bundles, including applications, are actually folders, but Finder always shows them to you as files. Another deception that the command line is no party to.

I know there are people who are scared of the command line, but me? It's the GUI that frightens me.



Edited by ganbustein (01/31/15 10:40 PM)

Top
#32902 - 02/02/15 12:23 PM Re: Removing an App [Re: ganbustein]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
Originally Posted By: ganbustein
This is not the only deception Finder pulls. It localizes the names of many folders and applications based on your preferred language.


On a vaguely tangentially related note, speaking of languages, it appears there's some funkiness in the way the Finder reports names with accented characters in them. If you use the version of PHP that ships with OS X and you write code that accesses files in the local filesystem, PHP appears not to be able to read files whose names contain accented characters, no matter what character encoding you use, even if the file paths and names appear identical in the Finder and PHP. I've never been able to figure out what gives with that.
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#32903 - 02/02/15 12:42 PM Re: Removing an App [Re: tacit]
ganbustein Offline


Registered: 08/04/09
Originally Posted By: tacit
[On a vaguely tangentially related note, speaking of languages, it appears there's some funkiness in the way the Finder reports names with accented characters in them. If you use the version of PHP that ships with OS X and you write code that accesses files in the local filesystem, PHP appears not to be able to read files whose names contain accented characters, no matter what character encoding you use, even if the file paths and names appear identical in the Finder and PHP. I've never been able to figure out what gives with that.

This may have to do with the fact that HFS+ uses "fully decomposed canonical" characters, stored on disk using UTF-16. PHP is probably using UTF-8, but that's no problem. The conversion between UTF-16 and UTF-8 is mechanical and trivial. The "fully decomposed" part is more interesting.

For example, the letter "รก" (an "a" with an acute accent), can be written in Unicode as either the single codepoint 00E0 (LATIN SMALL LETTER A WITH ACUTE), or as the pair of codepoints 0061 0301 (LATIN SMALL LETTER A followed by COMBINING ACUTE ACCENT). HFS+ insists on the latter, even though the printed glyph is exactly the same.

Even this conversion should happen automatically. Perhaps PHP is doing something to prevent the conversion.

Top
#32935 - 02/03/15 03:06 PM Re: Removing an App [Re: ganbustein]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
PHP supposedly supports both UTF-8 and UTF-16 with mb_convert_encoding, so there might be a way to force PHP to play nicely with Finder accented characters, but at the moment I don't have time to mess with it. The problem crops up in a FOSS cloud file storage app I was tinkering with (the developers actually withdrew the OS X version of the app because of it).
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
Page 3 of 3 < 1 2 3

Moderator:  alternaut, dianne, dkmarsh