-
Notifications
You must be signed in to change notification settings - Fork 12
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
Problem with cyrillic charset #9
Comments
Yes, Windows is sometimes a mess with it's charsets. Not even sure which one it's using for cyrillic / russian (not UTF-8 it seems). Have it on my todo-list - PRs welcome though! |
@yvesh Hi! |
Hey! i'm currently using FFI so i don't know if it's going to be of any help, but i am currently getting the correct window names this way: const buf = new Buffer.alloc(1024)
const ret = win32.GetWindowTextW(hwnd, buf, 1024)
const name = buf.toString('ucs2').replace(/\0+$/, '') Where win32 is the user32 dll via ffi-napi library. @edit: this does include emojis. Windows seems to not have a limit for window title size so it may be a problem sometimes. |
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: "╨Ф╨╢╨╕╨╜╤Б╤Л 511 Slim Fit Levi's┬о 6407635 ╨║╤Г╨┐╨╕╤В╤М ╨╖╨░ 3┬а544┬атВ╜ ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В-╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ Wildberries - Google Chrome",
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: "╨Ф╨╢╨╕╨╜╤Б╤Л 511 Slim Fit Levi's┬о 6407635 ╨║╤Г╨┐╨╕╤В╤М ╨╖╨░ 3┬а544┬атВ╜ ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В-╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ Wildberries - Google Chrome",
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: '╨Ъ╤Г╨┐╨╕╤В╤М ╨╝╤Г╨╢╤Б╨║╨╕╨╡ ╨┤╨╢╨╕╨╜╤Б╤Л ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В ╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ WildBerries.ru - Google Chrome',
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: '╨Ъ╤Г╨┐╨╕╤В╤М ╨╝╤Г╨╢╤Б╨║╨╕╨╡ ╨┤╨╢╨╕╨╜╤Б╤Л ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В ╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ WildBerries.ru - Google Chrome',
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: '╨Ъ╤Г╨┐╨╕╤В╤М ╨╝╤Г╨╢╤Б╨║╨╕╨╡ ╨┤╨╢╨╕╨╜╤Б╤Л ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В ╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ WildBerries.ru - Google Chrome',
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: '╨Ъ╤Г╨┐╨╕╤В╤М ╨╝╤Г╨╢╤Б╨║╨╕╨╡ ╨┤╨╢╨╕╨╜╤Б╤Л ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В ╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ WildBerries.ru - Google Chrome',
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
The text was updated successfully, but these errors were encountered: