Spaces in sketch names not allowed anymore in IDE 2.0.4?

Hello there,

I have recently upgraded my IDE to version 2.0.4, and I am now unable to open old sketches created with the previous version (2.0.3). The issue seems to be related to the names of these sketches, which contain spaces, and I understand that this is no longer allowed in the new version.

I was wondering if there is a way to bypass this new behavior. I have looked at the preferences menu, but I couldn't figure out how to do it.

Thank you in advance for your help.

Best regards,

Louis

If I not mistaken Arduino IDE 1.x never supported spaces in filenames... so no need to start in IDE 2.x :slight_smile:

they were never allowed in the first place

see Sketch specification - Arduino CLI

Sketch folders and files

The sketch root folder name and code file names must start with a basic letter (A-Z or a-z) or number (0-9), followed by basic letters, numbers, underscores (_), dots (.) and dashes (-). The maximum length is 63 characters.

Support for names starting with a number was added in Arduino IDE 1.8.4.

the new version enforces it.

Thank you for your responses, but...

... With IDE 2.0.3, I've created sketches with spaces in the names. Perhaps not my best idea, but it worked. So why was it possible with the previous version?

1 Like

I found an article stating that "Creation of sketches with non-compliant names is permitted" (version IDE 2.0.1)
==> Creation of sketches with non-compliant names is permitted · Issue #1599 · arduino/arduino-ide · GitHub

But anyway, it doesn't solve my problem.
Now I understand I'll have to change the names of my old sketches if I want to use 2.0.4 version replacing spaces with underscores for instance), or downgrade to the older version...

well you found the solution

That is a bug report. It was used to track this defect in Arduino IDE 2.x, not to indicate that this was an intended behavior.

This is ridiculous! Since the early eighties, when I started with Unix, I've been using spaces in filenames. And now, when AI is thriving, that is not possible anymore? This makes me very angry!

My "rule of the thumb" from eighties... - if you don't want a troubles - do not use spaces and national characters in filenames...

2 Likes

That’s because code is still developed by programmers who did not evolve from the 80s and don’t understand that ascii is no longer what it used to be in terms of the gold standard of text representation :slight_smile:

Modern OSes know how to deal with it but when you call she’ll scripts parsing or using file names you need to ensure special attention had been made to cope with those - including utf8 support.

So as long as this does not change your old rule is a good one…

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.