-
Notifications
You must be signed in to change notification settings - Fork 61
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
Has trouble with international (UTF) source #1221
Comments
Hello @simonjwright. I tried to reproduce the issue on VS Code with the following project and VS Code configuration: -- utf.gpr
-- utf.adb
-- .vscode/settings.json
And it worked. So I assume that the problem is that the Emacs ada-ts-mode is not sending the |
This is from the log, is that OK?
Previously we were sending "UTF-8" (this is actually the default with Emacs |
While I couldn't duplicate the same error as above, I stumbled across another error during completion using these same files which seems to be UTF-8 related. I've observed this with ALS 25.0.20240915 and 26.0.20241117 and also both with Emacs and VSCode, although it seems very repeatable with Emacs.
Here is the ALS log for this exception:
|
I just ran the VSS (25.0.0) test suite and got exactly this error.
Sorry about the undecorated traceback, see my comment in GCC PR 117538. This is what
The reason we’re getting PE is that the entire body of that subprogram except the |
Thank you for detailed report, it is unimplemented feature in VSS, we will implement it in the future version of VSS. Note, most probably, your editor doesn't use Normalization Form C. |
In my test file, lower case a grave Having converted with gnatformat failed in the same way for either source. |
@godunko, does VSCode not support NFC? As I mentioned above, I was able to duplicate this on VSCode too. The following is a snippet of the VSCode ALS log (see attached for the full log):
|
@simonjwright Ada standard "requires" use of NFC normalized text, use of other normalization forms is implementation defined. Normalization algorithm is quite complex, thus it is "slow". VSS run it only when detects that text is not normalized, and it is why this exception is not raised in the test suite. You might need to check Emacs settings to send text in NFC form in all ALS requests. For opened files text doesn't loaded from disk, but send by Emacs. PS. We are working on proper implementation of normalization in VSS. |
Yes, this looks fine.
With GNATformat, could you share how you reproduced the issue? Was the |
Many apologies: when I use that switch, the program completes successfully. My excuse, such as it is, is that after Just a slight point: if, as @godunko says, the 'Ada standard "requires" use of NFC normalized text', couldn't gnatformat's default charset be utf8? It’d be good if gnatformat made the default dependent on the platform, perhaps with an environment variable? Here I have |
Running this utf-8 file in ALS (Alire release 25.0.0) under Emacs ada-ts-mode
I get this message:
Running in VSCode, it fails - the log file says
The stack trace occurs twice. I may be able to decode it, but it’ll be much easier if you do it, and will make more sense! (see this gnatformat issue).
The text was updated successfully, but these errors were encountered: