The case of the missing Pi

As ADC natively require UTF-8, “all” text should be viewable. Swedish, Russian, Greek or Chinese, everything should look fine.

However, since a couple of versions back, I have not been able to see certain characters, which should be perfectly viewable in ADC and DC++. (Eg, pi (Π) or psi (Ψ).)

To start with my hunt, I looked at my Ubuntu box, where I have LinuxDC++ installed. As LinuxDC++ use DC++’s core, it could point in a correct direction as to why I didn’t see certain characters. I was able to see them perfectly fine in LinuxDC++, but I wasn’t completely confident that there was a problem in DC++ itself because of one major reason: LinuxDC++’s core is based of DC++ 0.691. Although it’s a fairly new version, it is still “old enough” to not have this particular bug.

Next, I fired up Elise, and it showed the same as LinuxDC++; all text completely visible. Although Elise is written in Java and is totally independent from DC++, it gave me a vital clue; ADCH++ wasn’t doing anything it shouldn’t.

I then proceeded and downloaded DC++ from the SVN, and compiled first in Debug and later in Release mode. The reason I did this: I needed to make sure I can at all see those characters in both modes, because there might have been some trouble with a debug version (provide more information and can break at specific places at will [crash and burn is good]) versus a release version.

Before I proceed, I should mention that I don’t have any “special encoding charset” or anything similar installed on my XP-machine, and it was possible that that was the problem. (My Ubuntu-box of course has a different setup, and Java isn’t “run in Windows” in the same sense.)

As I fired up the Debug version, in a folder which had no previous files from DC++, I experienced no trouble whatsoever with writing and reading above characters. “Ok. It’s viewable in DC++, at least. Let me see in Release.” To my surprise, here again were no difficulties.

At this point I knew the “special encoding charset” wasn’t necessary, as it worked for a freshly compiled version of DC++, both in debug and release mode. So, where could the problem be? Well, the only place where DC++ store anything about its settings is in dcplusplus.xml. I swapped the file with a clean one (untouched and without my own changes to it). “Yes! I got characters!”

While there are a bunch of settings in DC++, there are few that deal with how DC++ look and the characters that are being displayed. In Appearance there is an option to set Language file, and in Colors and Sounds, there are a four options that involve the appearance of DC++. I decided to rule certain features out; The Language file option doesn’t handle text coming from hubs, it only handles with text that is in actual DC++; Select Window Color, since it’s just color; The Uploads and Downloads options fall in the previous color category as well. So, what’s left? Well, Select Text Style. I remember having set the text style to MS Sans Serif. (This is not the same thing as Microsoft Sans Serif.) I changed the type to Microsoft Sans Serif (works with others as well, I suppose), and restarted DC++. Afterwards, I was perfectly able to see all those crazy characters in DC++!

So if you are in an ADC hub and see weird characters (that you can assume is not actual characters) (“Ctrl+Backspace” is the common characters one see if one doesn’t see the correct ones) it is not the fault of DC++ (well, perhaps, but still) but the text style you’ve chosen.

So, MS Sans Serif did it in the Colors and Sounds page with a text style.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your 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

%d bloggers like this: