[BUG] MacOS or Xojo ? (macOS !)

I think the bug belongs to macOS, but it’s just an opinion. Judge by yourself.

I place text in file names (after the page number) and in some cases I placed text inside < h1 >< /h1 > tags for later work.

NOTA: the < h1 >< /h1 > tags (read it without the spaces) is skipped by this software !

At Xojo project run time, I generate an html document that is displayed using an HTMLViewer. What was my surprise when the text inside the < h1 >< /h1 > tags AND AFTER ! appears taller. I looked at the line with attention and noted the end tag: <:h1>.

It is impossible to use the ‘:’ character in a file name under macOS, but I go there to check.

In fact, it is at read time (I think) that the change have been done.

Not a nuisance as the < h1 >< /h1 > tags have to be removed in some hours and is a memory recall, not part of the work process. I can use a sheet of paper to do that (or something else).

But there is something here worth to talk about.

Xojo 2021r2.1
Monterey 12.3.1 (21E258)

This is not a bug and nothing to be surprised about. macOS will always replace a / in a path by : – see Filename - Wikipedia

The colon is the path separator in HFS paths, slash in POSIX paths, so you should better use neither of them as part of the filename.


That is not what I saw. I was talking about file name.

Beside, on Intel, this behavior does not exists.

On Intel, the file name is reported as is.

on macOS (since 1984), a ‘:’ character in the file name is rejected and replaced with a ‘-’. But I was talking about a ‘/’ (slash) in the file name.

MacBook Pro 2014 i5
Xojo 2015r1
El Capitan

There are several threads about this issue in the forum. Just search for “finder slash”, e.g.
Getfolderitem Volume(i).name error (“:” replaced by “/”)

folderItem.name with slashes change

File name with / on Mac

Xojo 2020r1: Can’t get correct file name if it contains slashes

So this is a macOS “feature” and no bug.

This one is related and explain when in Xojo the change was made.

Nota: Related to the Slash in a file name, Firefox remove any slash you can place at save time in the file name.

What is really bother me is… the use of a slash in macOS is permited by the OS unlike the ‘:’ who is changed to ‘-’.

If everyone is OK with that…

When will A…Z (UPPERCASE, OF COURSE) and 0…9 will be the only characters allowed in the file names ?
(ASCII encoding or…)

Do you know that Finder Folder’s Pasted Custom Icons (invisible files) name ends with a CR ?
(yes, chr(13), a Return character)

The prohibition of forward slash in a Unix/Linux filename is documented.

On Mac, the problem is that Linux may accept the colon, but since the finder uses it internally, it shows it as -. Yet, the original Unix filename still contains the colon.

Personally, I would avoid both forward slash and colon altogether. Issue is, you can bet users will occasionally insist on using these characters and complain it is a bug.

I found an entry in Apple documentation statin “Some third party Applications does not like slash.” (bad translation from French).

So, the “fault” is Xojo.

Not a problem for me since this was a simple reminder that will be (or is already) removed at project beta stage.
Extract from the Apple document (the title of that document is: “Renommer des fichiers, dossiers et disques”):