views:

40

answers:

2

I have a weird situation that has been puzzling me for weeks. My project, Textual, is an IRC client for Mac OS X. It works great except one problem. DCC SEND messages via the DCC protocol do not work properly. For some reason the first section of the IP address sent for which connections will be established is always cut off. For example, the correct message sent would be "DCC SEND file.png 72.218.77.160 1097 4699" but once sent is viewed as "DCC SEND file.png .218.77.160 1097 4699"

I have isolated this to the Unicode character 0x01 which is sent along side the message to distinguish it from a standard message. If this character is removed then no stripping occurs. I simply cannot figure out why it does this. It could be a result of sockets or not. Not my strong area on that one. If anyone has time to help it would be appreciated.

A: 

Could be a BOM (Byte Order Mark). Which programming language are you using?

Depending on the Unicode flavor you're sending, certain meta-characters may be sent over to the other side. A good rule of thumb is to never send any flavor of Unicode to an endpoint that isn't capable of reading Unicode (some people compromise in the case of UTF-8 which is nearly identical to ISO-8859-1 for English text, but I'm not a big fan).

Isaac
A: 

After more investigation this appears to be a server-side problem and not an actual problem with the client itself.

Michael