vlang / vls

V language server. (Old V language server - see v-analyzer)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The comment in Chinese will change to garbled character

lydiandy opened this issue · comments

System Information

V doctor

vexe mtime: 2022-06-03 01:07:01
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 44ba197.251716f

Git version: git version 2.32.1 (Apple Git-133)
Git vroot status: weekly.2022.22-32-g251716fa
.git/config present: true
thirdparty/tcc status: thirdparty-macos-amd64 46662e20

VLS info

latest from github
vls version 0.0.1.1212445

Problem Description

here is the example:

module main

fn main() {
	println('test') //这是中文注释
}

When I add comment with Chinese, I format the code with vscode, the first time is ok.
But when I edit the comment, and reformat, the comment change to garbled character.

I use v fmt tool, The result is always correct.

Expected Output

module main

fn main() {
	println('test') //这是中文注释,新内容
}

Actual Output

module main

fn main() {
println('test') //这是,新内容��, 新内容,新内容
}

Steps to Reproduce

Last Recorded LSP Requests

It works, thank you~