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

Completion doesn't work if C source files contain some Unicode symbols. #2126

Closed
mukovnin opened this issue Aug 30, 2020 · 4 comments
Closed
Labels

Comments

@mukovnin
Copy link

Hi!

May be this issue related to ccls or #2080 bug.
I'm using latest lsp-mode, company and ccls packages from MELPA. Emacs 27.1.

Describe the bug
Completion doesn't work properly if C source files contain some Unicode symbols in comments.

To Reproduce
Create a file a.h:

/*
µ
*/
int Capability(int a, int *b);

and main.c:

#include "a.h"

int main()
{
}

Type "capa" in main(). Lsp-mode reports:

Warning (lsp-mode): Failed to parse the following chunk:
’’’
Content-Length: 355

{"jsonrpc":"2.0","id":16,"result":{"isIncomplete":false,"items":[{"label":"Capability(int a, int *b) -> int","kind":3,"detail":"","documentation":"�","sortText":"   !","filterText":"Capability","insertTextFormat":2,"textEdit":{"range":{"start":{"line":4,"character":4},"end":{"line":4,"character":7}},"newText":"Capability(${1:int a}, ${2:int *b})$0"}}]}}
’’’
with message (json-parse-error unable to decode byte 0xb5 near '"' <string> 1 147 147)

Which Language Server did you use
ccls

OS
Arch Linux

Error callstack
This.

@yyoncho
Copy link
Member

yyoncho commented Aug 30, 2020

I think it is most likely #1246

@yyoncho
Copy link
Member

yyoncho commented Sep 7, 2020

I tested that same setup with clangd-11 and it seems to work. Can you verify?

@mukovnin
Copy link
Author

mukovnin commented Sep 7, 2020

@yyoncho Checked with clangd 10, it works, thank you. It looks like this issue is related to ccls.

@yyoncho
Copy link
Member

yyoncho commented Sep 7, 2020

Thank you, I will close the issue and mark it as upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants