Forum C# String building

String building

Postby knurf » December 3rd, 2010, 1:01 pm

Hi,

I'm in the process of building a game and run in to a few issues when building strings from byte[].

Normally I'd use System.Text.UTF8Encoding or System.Text.UTF8Encoding for this, but these are not allowed it seems. So, how do I do it?

Further, is there a reason System.Xml cannot be used? I've worked around it for now, but still..

/ Pontus
knurf
 
Posts: 4
Joined: December 3rd, 2010, 12:51 pm

Re: String building

Postby knurf » December 4th, 2010, 1:55 pm

Ah well, I'm working around it for now by moving all of the bytes into a char[] instead. Then I can simply [new] me a string from it. It's not really the same of course, but good enough for now.
knurf
 
Posts: 4
Joined: December 3rd, 2010, 12:51 pm

Re: String building

Postby Oliver » December 16th, 2010, 1:11 pm

Hi,

Sorry for the late reply.

We'll look into UTF8Encoding and friends to see if we can add them to the whitelist.

We'll also look into adding xml to the whitelist.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: String building

Postby trycatchgames » May 21st, 2011, 6:29 pm

Bumping this thread. I would like to see UTF8Encoding whitelisted as well. :-)
trycatchgames
 
Posts: 21
Joined: March 25th, 2011, 2:39 am


Return to C#