Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode (non-ASCII) identifiers support #2632

Closed
3 tasks done
liuxilu opened this issue Feb 12, 2025 · 2 comments
Closed
3 tasks done

Unicode (non-ASCII) identifiers support #2632

liuxilu opened this issue Feb 12, 2025 · 2 comments
Assignees
Labels
conclusion: off topic Off topic for this repository type: enhancement Proposed improvement

Comments

@liuxilu
Copy link

liuxilu commented Feb 12, 2025

Describe the request

bool 我;

Describe the current behavior

Compilation error: stray '\346' in program

Arduino IDE version

nightly-20241212

Operating system

Windows, N/A

Operating system version

N/A

Additional context

Update to GCC 10 may work
GCC 10 Changes

Extended characters in identifiers may now be specified directly in the input encoding (UTF-8, by default), in addition to the UCN syntax (\uNNNN or \UNNNNNNNN) that is already supported:
static const int π = 3;
int get_naïve_pi() {
return π;
}

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details
@liuxilu liuxilu added the type: enhancement Proposed improvement label Feb 12, 2025
@per1234 per1234 self-assigned this Feb 12, 2025
@per1234
Copy link
Contributor

per1234 commented Feb 12, 2025

Hi @liuxilu. As you indicated, support or lack of support for non-ASCII identifiers is up to the compiler. Arduino IDE simply installs and uses whichever compiler the boards platform specifies. If the platform specifies a version of GCC that supports non-ASCII identifiers, then they will be supported, without any changes needed in Arduino IDE to allow such support. In fact, you will find that some boards platforms already do use such versions of GCC. For example, try compiling your code for a board from the latest version of the "esp32" boards platform.

So I will close this as off topic for this repository. You can submit requests for compiler version updates to the issue trackers of the individual Arduino boards platforms platforms. We already have such requests in official boards platforms:

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2025
@per1234 per1234 added the conclusion: off topic Off topic for this repository label Feb 12, 2025
@liuxilu
Copy link
Author

liuxilu commented Feb 13, 2025

Thank you for pointing out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: off topic Off topic for this repository type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants