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

Problems with show mp3 tags in other language

General discussion about LCD Smartie.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351

Post Reply
Vasyaberrr
Posts: 2
Joined: January 18th, 2006, 1:10 am

Problems with show mp3 tags in other language

Post by Vasyaberrr »

Dear developers, please tell me one thing. How about to show russian mp3 tags from Winamp? My smartie5 can do this in the programm interface, but can't show them to LSD (on LCD I see a rubbish). Please help! It will be wery good from a lot of russian speaking modders, because smartie is only free program for LCD!

Best regarts, Vasyaberrr
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

does your lcd module support russian characters :?:
Vasyaberrr
Posts: 2
Joined: January 18th, 2006, 1:10 am

Post by Vasyaberrr »

My module support russian characters (english & russian simbol syntesize display model datavision(taiwan) 16X2 hitachi compatible DV-16230S2FBLY/R
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

I don't suppose there's an easy way to replace individual characters with other characters, using a look-up table or similar?

I have an LCD with the A00 version of the HD44780, which has the basic English character set and (I think) Japanese, plus a bunch of symbols. What it doesn't have is the accented characters as used in European languages (grave, acute, umlaut, cedilla etc). That means that MP3 titles that have accented characters display with rubbish characters. The A02 version of the chip appears to have all the accented and Cyrillic characters.

So I figured for those MP3's or whatever that have accented characters, I could just replace the accented chars with the plain version (ie ? -> u, ? -> o, ? -> n etc.)

Short of using a horribly complex regexp( which I haven't yet got to grips with), is there way to do this? A "character replace" plugin?

I'm using the Matrix Orbital serial mode in Smartie with my own PIC-based interface for a plain 16x2 LCD module (emulates Matrix Orbital serial module). I can provide schematic and source/binaries (HiTech PICC) if anyone's interested.

I could use the TestDriver but everything else works fine in Matrix Orbital mode. Is there an equivalent in this mode for the TestDriver CharMap?

Matt.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Short of using a horribly complex regexp( which I haven't yet got to grips with), is there way to do this? A "character replace" plugin?

Try my search and replace plugin for this...
U can fill the tables on the omit.ini with original characters and the replacement ones! :lol:
Last edited by limbo on March 8th, 2006, 3:17 pm, edited 1 time in total.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Or you can use the replace.dll
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Thanks for the tips Limbo!

I had just downloaded sandr.dll to create the custom-character "playing", "paused" symbols for winamp as per a couple of posts here.

Now I have section 2 of omit.ini dedicated to replacing the more common single accented characters with plain equivalents, so "Xos? Manuel Budi?o - Galo Gal?n" becomes "Xose Manuel Budino - Galo Galan".

The relevant section from omit.ini is:

[Search2]
1=?
2=?
3=?
4=?
5=?
6=?
7=?
8=?
9=?
10=?
11=?
12=?
13=?
14=?
15=?
16=?

[Replace2]
1=a
2=e
3=i
4=o
5=u
6=A
7=E
8=I
9=O
10=U
11=o
12=O
13=c
14=n
15=C
16=N

Section 1 has winamp status custom chars:
[Search1]
1=playing
2=paused
3=stopped

[Replace1]
1=$CustomChar(8,0,8,12,14,12,8,0,0)$Chr(136)
2=$CustomChar(8,0,0,10,10,10,10,0,0)$Chr(136)
3=$CustomChar(8,0,0,14,14,14,14,0,0)$Chr(136)

There isn't enough space in a single section for many more characters, but I guess it's possible to "pipe" the output from one sandr call into a second sandr?... nested calls.

PS a quick search didn't turn up any replace.dll. Where can this be downloaded (or don't I need it if I have sandr.dll?)

Matt.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

no it's a dll called replace and created by..... :smt017 hmmm what's his name... AHA!
Kamil Maciorowski
kox(at)wp.pl

But I can't find the download location... :smt017
:smt096 Damn
jonny
Posts: 48
Joined: December 18th, 2005, 5:50 am

Post by jonny »

mattcro wrote: There isn't enough space in a single section for many more characters, but I guess it's possible to "pipe" the output from one sandr call into a second sandr?... nested calls.
I don't know about piping, but you can use two different omit.ini files, by putting one in a different directory, and setting the path in the dll call. It would be possible to nest one sandr.dll inside the other in order to get all of the charachters replaced.
ie:
$dll(sandr.dll,1,$dll(sandr.dll,1,[whatever],c:\second\omit.ini))

It's not the most elegant solution, but it works.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Piping is acceptable, but please let me know how many entries you want to enter in a single Search and Replace block? 8)
ReverseEngineered
Plugin Author
Posts: 192
Joined: January 18th, 2006, 11:09 pm
Location: Saskatoon, Saskatchewan, Canada

Post by ReverseEngineered »

Yes, sandr is probably better for this than using regexp. Regexs are made for doing complex matches (like trying to recognize formatted strings), while sandr makes doing character-by-character replacements simple.

As part of my first release, I made sure that in the future it would be possible to specify a filename instead of the replacement string, and that this would use the text in the said file as the replacement string. This would make long, complicated regexs (like there are any other kind) easier to use. However, I didn't get around to that step (other things to worry about).

Glad you found a solution that works. It's unfortunate that the HD44780 just doesn't make it possible to fully support internationalization.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

ReverseEngineered wrote: It's unfortunate that the HD44780 just doesn't make it possible to fully support internationalization.
But it's the basic reason for the low cost of these LCD modules... :wink:
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Could the number of entries per SandR block be variable? That way you can have exactly as many as you need, up to perhaps 100, or maybe even 255... as long as it doesn't take too much time for the plugin to scan through a big ini file each time it's called.

Matt.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

variable must have an upper bound which means that someone or with some way we must tell to plugin how many search cycles must done....
Maybe with another variable...
Maybe by counting the total letters in the first string...

But I have to try some demo codes for this.

Why do you want to use replace cylce large like this?
ReverseEngineered
Plugin Author
Posts: 192
Joined: January 18th, 2006, 11:09 pm
Location: Saskatoon, Saskatchewan, Canada

Post by ReverseEngineered »

Actually, this should be entirely possible. Just keep reading consecutive Search keys from the .ini until one can't be found, then read consecutive Replace keys until you reach the same number, or run out (in which case you should signal some sort of error). The only trick is that there can't be any holes (i.e. You can't assign something to 5 and leave 4 blank).

Of course, if you drop the .ini architecture entirely, this becomes trivial. A simple format would be a text file where each line describes a single replacement of the type "search" = "replace". Quotes would be necessary to ensure proper parsing. It would be simple to write a function to parse this into the "search" and "replace" parts.

This is similar to what I plan on implementing in regexp.dll (when I have the time).
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

Maybe I misunderstand you, but you could make a custom MO firmware for your pic.

This is how it would work. If the character (about to be printed; the current character just read in) equals the ASCII value for u then print the ASCII value for the accented u instead.

J
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

That's a good idea, J. I'm not likely to be using the Japanese (I think that's what they are) characters, so I could just modify my firmware to have a "switch/case" block or lookup table to convert any accented characters to their plain equivalent, provided they are not part of a command string (ie that they are characters to be displayed). Gonna try it soon...

Matt.
Post Reply