Skip to content

fix massege box with non ascii carecters - #120

Merged
JumpLink merged 4 commits into
JumpLink:mainfrom
naattxx:main
Jun 10, 2026
Merged

fix massege box with non ascii carecters#120
JumpLink merged 4 commits into
JumpLink:mainfrom
naattxx:main

Conversation

@naattxx

@naattxx naattxx commented Jun 10, 2026

Copy link
Copy Markdown

fix #119 using Buffer.byteLength(str, 'utf8')

@JumpLink

Copy link
Copy Markdown
Owner

@naattxx thanks for the fix! 🙂 The root cause is exactly right, but please don't pull in Node.js modules here: the app runs on GJS, not Node.js, and node:buffer would just bloat the bundle (even though it is still possible to use Node.js modules with GJSify).

The fix works without any dependency, just pass -1 and GTK figures out the byte length itself:

  this._textView.buffer.insert_at_cursor(message, -1);

Could you change that and revert the @types/node / tsconfig / lockfile changes? Then this is good to go 👍

@JumpLink
JumpLink merged commit 50d35ad into JumpLink:main Jun 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect byte count for message box

2 participants