Color Codes interpreted as visible characters

Posted by Jcet on Thu 07 Aug 2003 08:39 PM — 3 posts, 15,101 views.

USA #0
On the MUD I, and a friend are coding(dbzreality.servegame.com:6212) we've ran into some trouble with color codes, and how clients interpret them(as visible characters).
Naturally we have a map system, and alot of other intricate stuff that has alot of color, so we need to know what is wrong. If you haven't figured out what I'm talkin about yet..

Jcet telepaths to you, "ooo"
(59 Characters.)
That outputs(tags represent where the colors are, IE <brown> = ).

<brown>Jcet telepaths to you, "<yellow>ooo<brown>"

(without color)
Jcet telepaths to you, "ooo"
(28 Characters.)

My point is, most MUDs I've seen can color every other letter, have the client connected wrap at 80, and say an 80 character(actually visible) line, and it doesn't wrap.
So basicly lines as simple as the one above, the character length is alot longer than the actual visible character length is.
So if anyone has a solution to the problem, without having to do a custom wrapping function, contact me, or leave a message here, or if you know what the problem is, contact me, or leave a message here.

AIM SN: Jcet Shakaar.
Email: Jcet@ev1.net
Feel free to contact me there.
Amended on Thu 07 Aug 2003 11:18 PM by Jcet
Australia Forum Administrator #1
What is the problem exactly? You want to wrap at the server end but are having trouble counting to 80 visible characters? Or the colours are not appearing correctly? Or the client wraps at the wrong place?
USA #2
I have just found out the source of my problem, it is the autowrap feature for BYOND(Build Your Own Net Dream). It is made to ignore html tags, but not ansi color codes.
I was reading up in the forum, and found out about that. All signs led to it being how the color codes were interpreted(color codes adding to the 'visible' length, when not actually visible).

Sadly, I found out it is not easy fix-able.

Thanks Anyways.

P.S. MUSHclient owns. Feel free to close this thread.