Simple Voice Chat

Simple Voice Chat

31M Downloads

Audio device character encoding not working with russian characters

Strongleong opened this issue · 23 comments

commented

All microphones and speakers names in my system are written in russian. In voice chat settings their names are written in gibberish
2021-03-29_15 35 54

Also it would so simpler if I can choose input/output devices form dropdown menu

P.S. Sorry for errors in text :)

commented

It would be nice if you could test something for me:

  1. Make sure you have the Java JDK installed
  2. Download this zip file
  3. Unpack it into an empty folder
  4. Open a command prompt in that folder
  5. Run javac .\Main.java
  6. Run java Main
  7. Copy the output of that command and send it to me

It would help me a lot, since I have no russian windows to test it on :D

commented

No output
изображение

commented

Yes, this command is supposed to have no output.
Just run the next command.

commented

I ran your code in VSCode, here is output:

PS C:\Users\strongleong> & 'c:\Users\strongleong.vscode\extensions\vscjava.vscode-java-debug-0.32.1\scripts\launcher.bat' 'C:\Program Files\Java\jdk-16\bin\java.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:63523' '-XX:+ShowCodeDetailsInExceptionMessages' '-Dfile.encoding=UTF-8' '-cp' 'C:\Temp\vscodesws_bcdc6\jdt_ws\jdt.ls-java-project\bin' 'Main'
sun.jnu.encoding -> Cp1251
file.encoding -> UTF-8
Charset.defaultCharset() -> UTF-8

Default String: Первичный драйвер записи звука
UTF8: 0J/QtdGA0LLQuNGH0L3Ri9C5INC00YDQsNC50LLQtdGAINC30LDQv9C40YHQuCDQt9Cy0YPQutCw
Default Charset: 0J/QtdGA0LLQuNGH0L3Ri9C5INC00YDQsNC50LLQtdGAINC30LDQv9C40YHQuCDQt9Cy0YPQutCw

Default String: Microphone (AN-VC400 Camera)
UTF8: TWljcm9waG9uZSAoQU4tVkM0MDAgQ2FtZXJhKQ==
Default Charset: TWljcm9waG9uZSAoQU4tVkM0MDAgQ2FtZXJhKQ==

Default String: Лин. вход (Realtek(R) Audio)
UTF8: 0JvQuNC9LiDQstGF0L7QtCAoUmVhbHRlayhSKSBBdWRpbyk=
Default Charset: 0JvQuNC9LiDQstGF0L7QtCAoUmVhbHRlayhSKSBBdWRpbyk=

commented

Thank you for reporting this issue!
Can you tell me what windows version you are using?

commented

Windows 10 pro 20H2 x64.

Also I am sure that problem not only with russian characters, but with all non-unciode, like japanese e.t.c.

commented

Yeah I'm pretty sure, too.
I think it is definitely related to this: https://bugs.openjdk.java.net/browse/JDK-8177951

commented

Yes, this command is supposed to have no output.
Just run the next command.

Don't saw it, lol.

commented

Thank you!
I will let you know once I have an update on this.

commented

I think I found a fix.
I can send you the fixed mod, so you can test if it works.
Are you using the Fabric or the Forge version of the mod?

commented

Fabric

commented

Try this version:
voicechat-1.16.5-1.1.5.zip
Just unzip it and put the jar in your mods folder.
You don't have to replace the mod on your server, since the changes are only client side.

Please let me know if it works for you.

commented

Well... It is better than was. Kind of
изображение

commented

So, I found the issue. It seems to be a bug in Java 8. You can fix the issue by installing Java 11 and setting it as Java executable in the advanced profile settings of your launcher.

image

commented

I have java 16
Same problem

изображение

commented

Have you switched back to the old mod version?

commented

Which one exactly? That you gave me or that lying at curseforge?

commented

The version from cuseforge

commented

It work...
So much time and effort wasted :/
Sorry
изображение

commented

It's fine. Now we know it and other people know how to fix it if they encounter this.
Thank you for your help :)

commented

Oh man...
I have another one to test for you:
voicechat-1.16.5-1.1.5.zip

Sorry to bother you with this stuff :D but it is basically trial and error for me...

commented

изображение

Not worry about bothering me, I am happy to help develop this mod.

Also try renaming one of your audio device to some random unicode text and try your patches by yourself.
Microphone in Russian: "Микрофон"

commented

Also try renaming one of your audio device to some random unicode text and try your patches by yourself.
Microphone in Russian: "Микрофон"

Great idea! Thank you! I think I am now able to test it myself!