jorgegarcia / UnityOSC

Open Sound Control (OSC) C# classes interface for the Unity3d game engine
498 stars 124 forks source link

Send / Receive extended ASCII strings #27

Open Andergraw opened 6 years ago

Andergraw commented 6 years ago

Hi Jorge! Thank you for your work, it helped me a lot understanding OSC. I have one question I cannot find a solution over the Internet. I haven't seen explicitly that it is not possible sending extended ASCII characters in strings. Nevertheless, I can't do that. Whenever I try to, I get the "?" character. I know it's maybe not related to your plugin specifically, but any help would be much appreciated since I can't find any info even in the OSC web.

¡Muchas gracias!

jorgegarcia commented 6 years ago

Hi @Andergraw,

Thanks for your message, I'm glad UnityOSC helped you :)

I have investigated a bit and it seems that System.Char may be the type you are looking for when trying to read/write ASCII characters. It's strange it's not supported though, since OSCPacket.cs uses Encoding.ASCII.GetString. It would be worth trying out adding the CHAR type in the library (both in OSCMessage.cs and OSCPacket.cs).

I'm sorry at the moment I don't have the time to do it, so if you manage to get it working please let me know and I will integrate it with the library!

All the best, Jorge