maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Konwert filter (advance programmer request) (https://talk.maemo.org/showthread.php?t=26637)

Addison 2009-02-05 02:32

Konwert filter (advance programmer request)
 
1 Attachment(s)
Greetings gentlemen!

So I rebuilt a VeraMono Bitstream font to correlate the coding inside to match this character table:
CP 437

Using Xterm, if I type this, I get a nice little picture of a diamond symbol, very nice!
echo -e '\0004'|konwert cp437-utf8

However, if I type this, I get nothing... it should be a club symbol. :(
echo -e '\0005'|konwert cp437-utf8

Also evidenced by this:
http://img25.imageshack.us/img25/1527/29106511vz5.png

Notice all of the missing clubs and display weirdness. It usually shows a "dark shade" most of the time instead of a blank space when it encounters a club symbol.

Anyway, so I created a file with this command inside:
~/.konwert/filters/club
#!/bin/sh
exec trs -e '\5 \342\231\243'

Made it an executable:
chmod +x ~/.konwert/filters/club

Now, when I telnet using the following command, everything works correctly.
filterm ascii-ascii cp437-utf8+club telnet becksbbs.synchro.net

Here's the result:
http://img23.imageshack.us/img23/1428/98036407eu1.png

Problem is, the little tablet can't handle the constant extra executable code and the speed of telnet now chunks down to about 10% of it's normal speed.

Can anyone manually insert the needed coding into Konwert filters so I can enjoy the same speed as before?

Also, are there any other character codes, besides clubs, that konwert isn't handling correctly during translation?

I'm only asking because If you look at both those pictures, you'll see a dark blue shadow graphic that doesn't belong and I don't know why.

Well, I'll honestly be forever grateful if there is someone that can find a resolution to this request. :D

Many thanks ahead!

Attachment 3088

ArnimS 2009-02-07 06:01

Re: Konwert filter (advance programmer request)
 
Bump for coolness.

Addison 2009-02-08 07:18

Re: Konwert filter (advance programmer request)
 
1 Attachment(s)
Hey Arnim, at the time this topic was only something like three down from the top.

Nice bump though. *lol*

Okay, turns out that it wasn't nearly as an advanced request I thought it would be.

I just edited this file:
/usr/share/konwert/aux/charsets/cp437

and added this one line
<5> ♣

That was it. I have it available as a download at the end here.

So yeah, I'm totally fired up now! It's been almost a year trying to get this Telnet thing perfect.

Anyway, one question though.

Xterm comes with a few types of encoding such as Latin (ISO 8859-1), East European (ISO 8859-2), etc.

Where might I start if I wanted to edit one of those and change it to CP437?

I'm not finding a character table or anything so I'm not sure what file to look at and attempt to edit.

I only ask because I thought maybe I could get the speed even faster than what it is now since the tablet wouldn't have to constantly be doing on the fly translations for each character.

Thanks!

qwerty12 2009-02-08 10:05

Re: Konwert filter (advance programmer request)
 
Probably not going to be easy for someone who has the knowledge to do it, I quickly added in an option into osso-xterm to show the CP437 encoding option but when I select it:

Quote:

osso-xterm.launch[15683]: GLIB WARNING ** default - Unable to convert characters from UTF-8 to CP437.
osso-xterm.launch[15683]: GLIB WARNING ** default - Unable to convert characters from UTF-8 to CP437.
osso-xterm.launch[15683]: GLIB WARNING ** default - Unable to convert characters from UTF-8 to CP437.

Addison 2009-02-12 06:21

Re: Konwert filter (advance programmer request)
 
Thanks a ton Qwerty!

That error actually proved quite helpful!

Knowing that Xterm would still need to convert each character on the fly means that I have the fastest setup possible so I can end it right there.

In all honesty, as fast as it's running right now, I didn't think I would have gotten much of a speed increase anyway modifying an already existing encoding scheme.

So knowing that I have finally reached the end in getting this to work is such a great relief!

Thanks to all who tolerated my unrelenting, obsessive questioning for the past year! :D


All times are GMT. The time now is 10:40.

vBulletin® Version 3.8.8