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

How to display European chars correct with smartie?

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
Sentinel
Posts: 2
Joined: April 20th, 2006, 9:33 am

How to display European chars correct with smartie?

Post by Sentinel »

I use bolymin PLED to display information with smartie. This PLED have english/european char table. My problem is, when i play file with european chars like - Dj Szatm?ry - Sz?z ?vet v?rn?k display smartie bad characters like - Dj Szatm~ry - Sz#z &vet v{rn#k

can i these speciel european chars (???ő???ű? and ???Ő???Ű? correct display?
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Well one way is to make some custom characters and use the search and replace plugin :)
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Instead of using custom chars (they may not be available on some displays, and there aren't enough char slots anyway), use search-and-replace (sandr.dll) to replace individual characters with the correct ones if the character sets of your display doesn't correspond exactly to the ASCII (or whatever) set.

Another potential problem is plugins developed with .NET languages (eg VB and C#) using string functions that turn extended ASCII set characters into multibyte or unicode characters. At least, I think that is what has happened to me a few times. LCDs have no understanding of multibyte/unicode and will display 1 or often 2 garbage characters instead of the correct character. You can see the garbage characters in bothe the Smartie preview window and on the LCD. Some plugins coded with the good old C/C++ string functions work correctly.

Matt
stef942
Posts: 5
Joined: August 21st, 2006, 9:59 am
Location: France

Post by stef942 »

Hello,

i use search and replace plugin for rss feeds as in french there is some special characters like ?????, etc....

but there is a problem i always have the same message : [dll : too many parameters] :(

for example :

$Rss(http://www.clubic.com/xml/news.xml,t,0) ==> works fine but with ~#^`|[[{ characters :D

$dll(sandr,1,$Rss(http://www.clubic.com/xml/news.xml,t,0),d:\smarties\plugins\omit.ini)

====> never works : [dll : too many parameters]

help please
IFR
Plugin Author
Posts: 201
Joined: April 6th, 2005, 12:59 am
Location: Canada
Contact:

Post by IFR »

stef942 wrote:Hello,

i use search and replace plugin for rss feeds as in french there is some special characters like ?????, etc....

but there is a problem i always have the same message : [dll : too many parameters] :(

for example :

$Rss(http://www.clubic.com/xml/news.xml,t,0) ==> works fine but with ~#^`|[[{ characters :D

$dll(sandr,1,$Rss(http://www.clubic.com/xml/news.xml,t,0),d:\smarties\plugins\omit.ini)

====> never works : [dll : too many parameters]

help please
I think that the commas are confusing the program...
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Yes is definitely the commas :?
I'm thinking about a solution using a variable plugin... :smt115
I'll give it a try soon :smt024
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Here's a screenshot showing what happens on my system when extended/european characters occur, as per my previous post in this thread. The actual LCD output corresponds to the preview window. System language is English (UK).

Image

The plain winamp title on the botton line is correct, as is the top line which is processed by my scrollpad plugin (uses same string handling code as regexp.dll). And I just realised there's a typo in the track name...

However, the 2nd and 3rd lines use splittitle.dll which seems to mess up the european characters (the problem isn't specific to splittitle - other plugins do exactly the same thing). My quick tests a while ago suggested that any ASCII extended character (ASCII code >127) gets messed up by some plugins. I don't know if this is mangled unicode or what.

I assume this is something for plugin authors to address rather than a problem with the Smartie code??

edit: Just been looking at Unicode and UTF-8 encodings, and C3 B6 is the (hexadecimal) code in UTF-8 for "?". C3 is the ASCII extended code for "?" and B6 is the ASCII extended code for "?", and it's this pair of characters that appear in place of "?". So, don't use string functions that use Unicode, or make sure you convert to single-byte strings (eg char *) before returning them to Smartie. I can't say I really understand all the ins and outs of this as I'm no programming expert...
ALiG
Posts: 2
Joined: August 17th, 2006, 8:56 pm
Location: Bulgaria

Post by ALiG »

I have troubles with displaying all the characters of the Bulgarian alphabet (а, б, в, г, д, е, ж, з, и, й, к, л, м, н, о, п, р, с, т, у, ф, х, ц, ч, ш, щ, ъ, ь, ю, я) upper and lower case. I can't use search and replace becase there are only 40 slots and the letters are nearly 60. So is there another way of displaying cyrilic characters?
trivius
Posts: 2
Joined: April 14th, 2008, 11:12 pm

How to display European chars correctly? Use unaccent.dll

Post by trivius »

Hi,
I was annoyed from this as well, so I wrote the unaccent.dll plugin.

For 1Byte coding - Function 1 does just translating one character into another (which is in LCD's ROM and can be displayed)

For 2Byte coding - Function 2 can take the code (in decimal form 000-999, which is sufficient for many encoding, as UTF-8, etc.) search the text for letter and translate it into displayable char.

Give it a try and tell the result. For more info see at http://forums.lcdsmartie.org/viewtopic. ... t=alphabet

Regards, Trivius



Here is an example:

Image
Gorgar
Posts: 7
Joined: November 22nd, 2006, 5:38 pm
Contact:

Post by Gorgar »

ALiG wrote:I have troubles with displaying all the characters of the Bulgarian alphabet (а, б, в, г, д, е, ж, з, и, й, к, л, м, н, о, п, р, с, т, у, ф, х, ц, ч, ш, щ, ъ, ь, ю, я) upper and lower case. I can't use search and replace becase there are only 40 slots and the letters are nearly 60. So is there another way of displaying cyrilic characters?
Hi,
Try this:
http://forums.lcdsmartie.org/viewtopic. ... highlight=
or
http://forums.lcdsmartie.org/viewtopic. ... ht=russian
Post Reply