Skip to content
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

Issues with Character Encoding #28

Closed
haganbmj opened this issue Jan 15, 2017 · 4 comments
Closed

Issues with Character Encoding #28

haganbmj opened this issue Jan 15, 2017 · 4 comments

Comments

@haganbmj
Copy link

Originally mentioned in obs-websocket-community-projects/obs-websocket-js#6

Desired Scene Name: Änd

16:29:59.123: Source 'Scene 2' renamed to 'Änd'
16:30:25.151: obs-data.c: [obs_data_create_from_json] Failed reading json string (1): unable to decode byte 0xc4 near '"'
16:30:25.151: [obs-websockets] invalid JSON payload for '{"scene-name":"Änd","message-id":"11","request-type":"SetCurrentScene"}'

Sending 'getCurrentScene' or similar functions returns the correct scene name, but sending a request to setCurrentScene fails
https://github.com/Palakis/obs-websocket/blob/master/WSRequestHandler.cpp#L64-L77

@Palakis
Copy link
Collaborator

Palakis commented Jan 15, 2017

Hmmm, might need to enforce UTF-8 in my code...

@Palakis Palakis added the bug label Feb 3, 2017
Palakis pushed a commit that referenced this issue Feb 4, 2017
@Palakis
Copy link
Collaborator

Palakis commented Feb 4, 2017

I replaced all my calls of toLocal8Bit()with toUtf8(). Can you test from your side, please ?

@haganbmj
Copy link
Author

haganbmj commented Feb 4, 2017

Yeah, I'll get that built when I get home and get back to you on it.

@haganbmj
Copy link
Author

haganbmj commented Feb 4, 2017

16:10:54.145 [OBSWebSocket] [sendRequest] Object { scene-name: "Änd", message-id: "3", request-type: "SetCurrentScene" } 1 obs-websocket.js:135:7
16:10:54.149 [OBSWebSocket] [onMessage] Object { scene-name: "Änd", update-type: "SwitchScenes", sceneName: "Änd", updateType: "SwitchScenes" } 1 obs-websocket.js:158:5
16:10:54.151 [OBSWebSocket] [onMessage] Object { message-id: "3", status: "ok", messageId: "3" } 1 obs-websocket.js:158:5

Also tried a couple other test strings and everything seemed to be in order. (Only tried SetCurrentScene)

Thanks for the help!

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

No branches or pull requests

2 participants