language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

VSCode extension bug with Chinese comment

Open jacksonyu opened this issue 3 years ago • 4 comments

Bug description

when there are any Chinese characters in the comment , the prompt message will be displaced. pls check the picture: 企业微信截图_16698730889157.png

and you delete the Chinese characters, everything works fine: 企业微信截图_16698730889157.png

How to reproduce

Expected behavior

the prompt messages are displaced normally

Prisma information

// Add your schema.prisma
// Add your code using Prisma Client

Environment & setup

  • OS:
  • Database:
  • Node.js version:

Prisma Version

4.7.0

jacksonyu avatar Dec 01 '22 06:12 jacksonyu

Have the same problem. Not only Chinese characters in comments cause the highlight misposition, but any non-latin symbols! To reproduce just try to paste into comments 'абвгд' There is a problem with errors highlighting too. And when have a lot of such comments debugging is very awful.

Prisma version 4.7.1 Снимок экрана 2022-12-08 111149

iamel89 avatar Dec 08 '22 07:12 iamel89

Yep, can confirm! Seems to be something about how we handle utf-16 vs utf-8 characters and the conversion between how we represent Positions here vs in Engines image

Running on: Prisma v4.7.1, VSCode: v1.74.0


Schema for ref

generator client {
  provider        = "prisma-client-js"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
  relationMode = "prisma"
}

model User {
  id Int @id @default(autoincrement())
  email String @unique
  posts Post[]
}

/// абвгд
model Post {
  id Int @id @default(autoincrement())
  author User @relation(fields: [authorId], references: [id])
  authorId Int
}

Druue avatar Dec 09 '22 09:12 Druue

Can anyone says when this would be done? Is there any plan to close this issue?

iamel89 avatar May 12 '23 10:05 iamel89

Can anyone says when this would be done?

No.

Is there any plan to close this issue?

Yes, when there is capacity. PRs welcome as well, happy to review.

janpio avatar May 12 '23 12:05 janpio