Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Search & Replace and Dvbviewer plugin not working togeth

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
Petzku
Posts: 8
Joined: April 1st, 2008, 11:21 pm

Search & Replace and Dvbviewer plugin not working togeth

Post by Petzku »

Hi,

I'm using the DVBViewer plugin to show info on the LCD Screen. I have been able to make it otherwise work ok, but scandinavian letters like ? or ? don't show up correctly.To rectify this I have looked up the char codes for the letters on my Matrix Orbital LCD and tried to use the sandr plugin to insert those char codes to the strings. But instead of working nicely sandr seems to just insert more "crap characters" instead of showing the correct characters. I wonder why this happens?

sandr works fine with plain strings so I know that my omit.ini is working ok.

[Moved from general discussion]
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

How are the accented/umlauted characters showing for you? Some plugins don't correctly handle the extended ASCII character set used by LCDs, so things like ? appear as 2 rubbish characters. See my posts in this thread. There are some other posts about displaying European and Cyrillic characters - see http://forums.lcdsmartie.org/viewtopic.php?t=1467 for example, and do a forum search.
Petzku
Posts: 8
Joined: April 1st, 2008, 11:21 pm

Post by Petzku »

Hi,

My characters look identical to those in your image in the second thread you linked. So the dvbviewer plugin somehow mangles the characters (the dvbspy.exe, program used to check the contents of the variables available to the dvbviewer plugin, shows the umlauts correctly). When i try to use the search and replace plugin it actually only adds two additional crap characters on top of the existing two instead of replacing them.

I have been searching the forums and read the threads you linked, but they don't really help.
Is there any way to fix the characters without changing the dvbv plugin itself?
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

I don't think there is a way around this other than modifying the plugin to correctly handle the characters internally - I guess it needs to translate unicode to extended ASCII. :cry:
Petzku
Posts: 8
Joined: April 1st, 2008, 11:21 pm

Post by Petzku »

I have made some progress on this matter. I got sandr to replace lowercase umlaut letters with the correct characters by changing the search for strings to match those that the dvbviewer plugin really gives to the lcdsmartie. Like ä for ?.

However with capital umlaut letters this gets a little more difficult since they show up as ? and a box (character that's just a full box filling the character space). It is kind of hard to find that from the character map application. So this led me to think if it would be somehow possible to dump the strings that the lcdsmartie lcd-windows shows to a file? From there I could check which characters they exactly are.
grantb3
Posts: 50
Joined: February 10th, 2008, 4:27 pm

Post by grantb3 »

Find an editor that lets you view the values in hex. I use Codewright, but there are lots of free hex viewers you can get. Then you can cut and paste the box characters in text mode, switch over to hex and read the codes. From there you can use the hex values or key them in on your number pad using the Alt #### method.
Petzku
Posts: 8
Joined: April 1st, 2008, 11:21 pm

Post by Petzku »

grantb3 wrote:Find an editor that lets you view the values in hex. I use Codewright, but there are lots of free hex viewers you can get. Then you can cut and paste the box characters in text mode, switch over to hex and read the codes. From there you can use the hex values or key them in on your number pad using the Alt #### method.
The problem was getting the data from lcdsmartie namely its lcd-emulation window. But now I have already fixed this by manually going through all the box-like characters with the help of character map until I found the match.

Thanks for all the replies.
Presterin
Posts: 4
Joined: May 16th, 2008, 7:52 am

Post by Presterin »

Here is omit.ini file which converts:

? - A
? - a
? - O
? -o
? - A
? - a

Download here: http://www.savefile.com/files/1559956

I'll add a tutorial how to add your own characters.
Presterin
Posts: 4
Joined: May 16th, 2008, 7:52 am

Post by Presterin »

Ok, here's the tutorial.

Go to http://www1.tip.nl/~t876506/utf8tbl.html
There you will find this table:
Image
You will be only interested in highlighted columns.

Pick a character from first column. ? for example. Then look at the UTF-hx column on the same row. Value is C384. Split it in the middle, you get C3 and 84.

Open Windows Character map. I have finnish XP, but it looks the same in every language version.

Image

Change font to "System"
On the bottom of the window you see code. First you look for character which has code 0xC3 which is the first half of the UTF-hx value you chose. Select the character. Then look for character coded 0x84 and select it. Copy these two characters.

Open omit.ini in Notepad, change font to System.
Paste characters from Character map to [Search1] with quotation marks.

Image

Then add replacing character to [Replace1] section.

This should replace ?█ with A. Now add other characters following the same pattern.

You can also use custom characters, but this tutorial won't help you with that.

Sorry for my bad english..
Post Reply