SublimeDebugger icon indicating copy to clipboard operation
SublimeDebugger copied to clipboard

Fix debugger crashes caused by non-UTF-8 characters

Open huanzai opened this issue 1 year ago • 5 comments

huanzai avatar Nov 27 '24 03:11 huanzai

This seems like an adapter issue and not something we should be dealing with on our side. Which adapter are you using and what are you doing that causes it to send non utf-8 characters?

daveleroy avatar Nov 27 '24 04:11 daveleroy

I working on a new Lua adapter which works fine on vscode

huanzai avatar Nov 27 '24 05:11 huanzai

I'm not sure why we would try to work around this on our side and not fix the adapter? Is the adapter actually sending utf8 or is it sending stuff in the wrong encoding?

daveleroy avatar Nov 28 '24 02:11 daveleroy

Yes, in Lua adpater something will send non-utf8 characters. I thought SublimeDebugger may not support non-utf8 but it shouldn't raise a error.

huanzai avatar Nov 28 '24 07:11 huanzai

SublimeDebugger may not support non-utf8 but it shouldn't raise a error.

The debug adapter protocol explicitly requires utf8 encoded content. If your adapter followed the protocol you wouldn't be getting an error.

See https://microsoft.github.io/debug-adapter-protocol/overview

daveleroy avatar Nov 29 '24 17:11 daveleroy