Supercollider: Class 'Document' (SCIDE) unicode problems

Created on 27 May 2020  Â·  4Comments  Â·  Source: supercollider/supercollider

Environment

  • SuperCollider version: 3.11
  • Operating system: ArchLinux
  • Other details (Qt version, audio driver, etc.): Qt 5.14.2

Steps to reproduce

n = Document.new("n", "é")
n.string.postln
�
-> �
n.string.ascii
-> [ -23 ]
"é".ascii
-> [ -61, -87 ]

Expected vs. actual behavior

Whenever using non-ascii characters the Document class can't really retrieve the string properly, leading to bad unicode.

I didn't have time to understand better what is going on here, but I will try to explore deeper and give more information.

bug

All 4 comments

@adcxyz i think this is the reason why non ascii characters break SyncText :)

ha, good catch!
Until this is fixed, we can just filter them for SyncText,
or better replace them with some special character sequence like '?'

I found the issue.

In https://github.com/supercollider/supercollider/blob/develop/editors/sc-ide/primitives/sc_ipc_client.cpp#L352 it is returning a string using Latin1 when it should be using Utf8 as far as I understand.

Great! that should be a very simple and obvious pull request :-)

Was this page helpful?
0 / 5 - 0 ratings