Wide Strings

Oh yeah… Host currently runs at 173,840 lines of code (that’s /just/ the host, doesn’t include TeulKit, NetCode2, 3rd party libraries etc), client at 455,368 (although that includes both Unity 1 and 2 codebases, but excludes libraries too, e.g. the UI is largely its own library).

I have to convert the code that handles callsigns to use wide strings and wchars, and everything downstream of those. Forget rolling sleeves up, I might as well remove the shirt and several layers of my epidermis too.

Yeah … That’s gonna be a week to look forward to.

8 Comments

Just go to edit->replace all replace and replace char with wchar.

Damn the consequences! This is a dynamic development environment you’re working in, you need to acomplish this task at a dynamic pace inorder to expand the brand more efficiently.

Fail on multiple levels :) There are plenty of places where we really mean “char”, then what about unsigned and signed chars? What does “unsigned wchar_t” mean?

Then there are all the std::strings, and there are plenty of times when that’s what we actually mean. Then there’s the fact that we’re not unicoding the non-chinese battleground europe. Then there are the changes to the database…

Then there’s replacing string definitions with L”…” instead of “…” where wchars are required, there are printf format masks where %s has to become %ls. Etc, etc.

Nice try tho :)

What am I, retarded?

Everyone knows an unsigned wchar_t is a wchar_t without a sign bit. And it holds like, 65536 characters. Which is about, I think, half of the Chinese alphabet.

Believe me, I know what I’m talking about and its really the only way to go. You just need to use replace all for all of that stuff.

;)

So does this mean they’ll be room for some avatar choices in the non-chinese battleground europe? Like the ability to use the extra space for Squad patches.

Erh, Snoop – there’s no such thing as signed or unsigned wchar_t, mate, because all the bits in a whcar_t are used up by the wchar_t. And under various compilers, including GNU, wchar_t is a 32-bit size not 16 :)

Tell you what tho, you go ahead and convert MySQL and all the other 3rd party libraries we use to wchar_t’s and I’ll think about doing a global replace in our code.

– Oliver

You’re either humoring me or think I really AM stupid enough to truthfully suggest something this rediculus ;)

I’m just trolling for a reaction, I’m actually 3 years into a CS degree and know the last 2 paragraphs of what I just said are assinine :)

Oh, I was making no assumptions :) It was a useful argument to bounce off :)

So, it’s really just a five minute task then. ;)

You can this off the critical path list.

Really I think this will fall into the line of going where no rat has gone since 2001.

Leave a Reply

Name and email address are required. Your email address will not be published.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

You may use these HTML tags and attributes:

<a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <pre> <q cite=""> <s> <strike> <strong> 

%d bloggers like this: