$ and | Character Escaping
Moderator: Moderators
$ and | Character Escaping
We should try to set a standard for character escaping in the main chat and private messages....
I currently use (though I need to change some things - ex useless $ changing in the main) /%DCN036%/ for a $ and /%DCN124%/ for a | (very bloated). oDC++ uses something different, I haven't a clue about BCDC++, and I'm too lazy to check Open Direct Connect....
I know my way is quite bloated, but then again, odds are people won't being using it for usual chatting.
So what's the standard going to be eh? I'll support it whatever we decide on....
I currently use (though I need to change some things - ex useless $ changing in the main) /%DCN036%/ for a $ and /%DCN124%/ for a | (very bloated). oDC++ uses something different, I haven't a clue about BCDC++, and I'm too lazy to check Open Direct Connect....
I know my way is quite bloated, but then again, odds are people won't being using it for usual chatting.
So what's the standard going to be eh? I'll support it whatever we decide on....
-
- The Creator Himself
- Posts: 296
- Joined: 2003-01-02 17:15
how will this be implemented?
only convert on "&#[0-9]+;"?
or try to make something out of every "&[^;]*;"?
i.e. we won't be needing "&", or?
only convert on "&#[0-9]+;"?
or try to make something out of every "&[^;]*;"?
i.e. we won't be needing "&", or?
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
SDC can read $ in the main and pms fine, but how did you manage to get it to read | without escaping? After all, that should denote a new message right?although dc++ will just accept the $ and | in the beginning
And another point is that some clients (the one we all know and love - NMDC) won't see the message (or part of) if there is a $ or a |. So with escaping, that problem would be avoided.
-
- The Creator Himself
- Posts: 296
- Joined: 2003-01-02 17:15
by escaping? =) i e dc++ will not support the whole html &-escaping scheme...TasMan wrote:SDC can read $ in the main and pms fine, but how did you manage to get it to read | without escaping? After all, that should denote a new message right?although dc++ will just accept the $ and | in the beginning
$ in the main chat does not need to be escaped (and when chatting with DC++ user, it doesn't have to be escaped in PMs either)... however, | must always be escaped. I know that a few programs already do the /%DCN%/ escaping (the same as in $Key), and as that kind of escaping is kind of 'standard' in DC (at least for the key), IMO, it should be adopted to the chat & PMs...
Hehe oh I thought you meant WITHOUT escaping arne....I misread it. You meant to start with, you will only have $ and |...
Well ender, that's what I'm using currently....though I'm a little more bent towards the HTML standards right now. Slightly smaller at least (alright I like fast and small - lol and I program in VB)
Well ender, that's what I'm using currently....though I'm a little more bent towards the HTML standards right now. Slightly smaller at least (alright I like fast and small - lol and I program in VB)
I think we should let users use whatever client they prefer, and sollutions with long escapes looks very weird for others. My way might not be the best, but it escapes $ to [§] and | to [¦]. This way it doesn't look too weird for users on clients that doesn't escape this way. And they most defintely will understand the sentance.
Opera
Opera
Creator of the dc++ fork, oDC found at:
http://gempond.com/odc
http://gempond.com/odc
That is a very good point, imho.Opera wrote:I think we should let users use whatever client they prefer, and sollutions with long escapes looks very weird for others. My way might not be the best, but it escapes $ to [§] and | to [¦]. This way it doesn't look too weird for users on clients that doesn't escape this way. And they most defintely will understand the sentance.
Opera
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Okay, let's do it the HTML-way, will the & be escaped or what happens if someone wants to write exactly | in a chat session?
If not, you've just moved the problem around, not removed it...
If not, you've just moved the problem around, not removed it...
I wrote QuickDC - A DC++ compatible client for Linux and FreeBSD.
-
- Posts: 506
- Joined: 2003-01-03 07:33
No not really for chat atleast. But the | (pipe) must be escapedivulfusbar wrote:i would have gone for the irc-way of escaping CRLF, but i guess its to late todo it now in dc... so well.. i don't care.. i don't see the point of escaping $.
(I think it's annoying to not have a pipe, but then again... I'm a UNIX dude...)
I wrote QuickDC - A DC++ compatible client for Linux and FreeBSD.
-
- Posts: 506
- Joined: 2003-01-03 07:33
yes, i miss to be able to write one-linears and send it to people who are new in the *nix world.... doesn't irc use \001 or \002 or something for escaping? don't remember right now. Well that would probably not work in dc beacuse most clients would print those []-boxes for none-printable chars.
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.
-
- The Creator Himself
- Posts: 296
- Joined: 2003-01-02 17:15
Any solution chosen will of course have its own limitations on what you can and cannot write...so far, I haven't added &-escaping of the &, mainly because I anticipate that the string | is not one the average dc++ chatter would use...opera has got a valid point in that it's important to let the old clients at least see something, but with the html thing, in the future, we could add more strange characters, should I ever decide to support unicode in some way...the dcn goes down because of the same limitation, it only allows for 999 character substitutions, and is plain ugly...
The only thing I can't decide upon is whether to send the $ clean or escaped...
The only thing I can't decide upon is whether to send the $ clean or escaped...
Looks like you forced my hand ....I'll change my escaping to this in the next release....* You can now use $ and | in the chat. DC++ uses the HTML standard $ and | to replace them...some people
might not like this because it's different than the escape sequence used in the lock, but I prefer a standard way
of escaping that's not limited to numbers below 999...later on, perhaps I'll add full &-escaping support so that
people will be able to send all kinds of strange characters. The same escpace sequences are used in the description
and email.
-
- The Creator Himself
- Posts: 296
- Joined: 2003-01-02 17:15