Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
SideCN

 
Post new topic   Reply to topic Printable version
 View previous topic  ChatBak 0.1 - A lightweight, standalo... Post :: Post ASCCC Chat Client 1.9 Released  View next topic  
Author Message
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Thu Sep 03, 2009 1:11 am    Post subject: SideCN Reply to topic Reply with quote

In light of the other thread, I decided to give it a go myself at designing a chat client. This is my first time actually writing anything in C#, and my first time writing an application period, so the code is probably not as optimized as it could be. It's still very basic and lacks a few things such as both squad messaging and private messaging using / (though :name: works), any form of proper player name sorting whatsoever, and it doesn't handle errors yet. I was also experimenting with loading and saving settings, and using languages (?language en-US, fr-CA, es-ES, or ja-JP) for the fun of it (though I couldn't figure out how to make the client send ascii rather than unicode, so 'é' will not be properly rendered for Continuum users).



Also, Windows-only and no source for now (at least, not until I clean it up some).




SideCN.rar - 38.92 KB
File downloaded or viewed 37 time(s)
Back to top
View users profile Send private message Add User to Ignore List Send email
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Thu Sep 03, 2009 7:51 am    Post subject: Re: SideCN Reply to topic Reply with quote

Hakaku wrote:
I was also experimenting with loading and saving settings, and using languages (?language en-US, fr-CA, es-ES, or ja-JP) for the fun of it (though I couldn't figure out how to make the client send ascii rather than unicode, so '?' will not be properly rendered for Continuum users).


You need to get it to send an ANSI encoding (8 bits, ASCII is only 7bits).

If you want japanese to work convert it to UTF-8, but only other SideCN clients will be able to read it once you go outside the standard ASCII character set. (Continuum i think uses page 1140, but this is a total guess, you're have to experiement)
Code: Show/Hide

//for utf8
byte[] utf8String = Encoding.UTF8.GetBytes(srcString);

//using codepage 1140, i'm guessing this is what  continuum uses , but  I'm not sure which code page continuum uses, if you find this out you will be able to make the convertions work.  I just know the codepage it uses has the Euro (?) Symbol but not the GBP (?) symbol.

byte[] codepage1140String = System.Text.Encoding.GetEncoding(1140).GetBytes(mystring)


For more info, and a list of pages: http://msdn.microsoft.com/en-us/library/system.text.encodinginfo.getencoding.aspx
_________________
Rediscover online gaming. Get Subspace | STF The future...prehaps
Back to top
View users profile Send private message Add User to Ignore List
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Thu Sep 03, 2009 7:50 pm    Post subject: Reply to topic Reply with quote

I'll give it a shot, but I'm not convinced Continuum uses a specific codeset at all, the given characters are all arbitrary to me. As for non-latin writing systems, I suppose you could just check the string against a regular expression to see if it contains characters outside Continuum's range, and send Unicode instead; either that, or less appropriately, use the interface's current language-culture to assume the encoding. I'm more concerned about handling characters that Continuum already supports.
Back to top
View users profile Send private message Add User to Ignore List Send email
Louis
Newbie


Joined: Aug 24 2009
Posts: 20
Offline

PostPosted: Fri Sep 04, 2009 12:00 pm    Post subject: Reply to topic Reply with quote

nice client hak icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Fri Sep 04, 2009 4:12 pm    Post subject: Reply to topic Reply with quote

Hakaku wrote:
I'll give it a shot, but I'm not convinced Continuum uses a specific codeset at all, the given characters are all arbitrary to me.

It has to because character data is always encoded using a codepage. Often a program just uses the codepage that the system is currently using, but as ? symbols don't work (which they should if it was doing that) it must used a fixed codepage, so that all continuum clients use the same codepage.
Back to top
View users profile Send private message Add User to Ignore List
Louis
Newbie


Joined: Aug 24 2009
Posts: 20
Offline

PostPosted: Sat Sep 05, 2009 4:19 pm    Post subject: Reply to topic Reply with quote

i think your correct doc
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:23
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Sat Sep 05, 2009 6:44 pm    Post subject: Reply to topic Reply with quote

The way I'd do it is to just use the received byte as the image index in the font bitmap file. What's the codepage nonsense about?
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Mon Sep 07, 2009 12:26 am    Post subject: Reply to topic Reply with quote

YOU'RE correct, doc is correct.
_________________
SSC Distension Owner
SSCU Trench Wars Developer
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Misc User Apps All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 50 page(s) served in previous 5 minutes.

phpBB Created this page in 0.103753 seconds : 35 queries executed (40.6%): GZIP compression disabled