----- Original Message ----- From: "Panagiotis Sidiropoulos" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, February 20, 2006 6:16 PM Subject: Re: [lazarus] HtmlPanel: Non Latin alhabets and utf codepage.
> > http://mx.geocities.com/jesusrmx/lazarus/tpiprosamples.zip > > Thanks a lot. I will check it first thing tommorow morning. It is late > here in Greece and this need a lot of attention. > > > http://mx.geocities.com/jesusrmx/lazarus/images/tpipro_gtk1_greekcharset.png > > Yes, this is correct, I feel I will find the solution investigating your > source code. > Oops, I made the package before I make the last screenshot, to make the screenshot I modified iphtml.pas so it uses by default GREEK_CHARSET, if you want to try with your copy of iphtml.pas this is what I did: iphtml.pas:9135 Owner.Target.Font.Name := FontName; at this point insert a line so it should look like: iphtml.pas:9135 Owner.Target.Font.Charset := GREEK_CHARSET; iphtml.pas:9136 Owner.Target.Font.Name := FontName; This is only for testing, now what it needs is a font that supports GREEK_CHARSET, I think in your linux most fonts will do, but if not use program lazarus/examples/fontenum to find which fonts support the charset. Your sample file use specifically font Arial, if that specific font is not found, a default gtk font will be used, in my case I had to remove the "face=Arial" attribute from the htm file because in my case I don't have Arial font and default gtk font don't support GREEK_CHARSET, but font "Clean" do. The default font checkbox in the screenshot does just that, it assigns IpHtmlPanel1.DefaultTypeFace :='Clean' when it's checked. My guess is that your sample file is not UTF-8 encoded but simply thanks to your localized environment, greek chars were entered using local encoding, this seems to be confirmed with a simple change in your sample file, in the header instead of charset=UTF-8 I changed to charset=ISO-8859-7 then I opened the file with opera (even with an old version 7) and it showed the file correctly. A final weird thing, from a old post from you I have a screen shot that show that tpipro rendered correctly greek chars, http://www.magentadb.gr/ftp/paint-selection-sample.jpg how is that it worked before but actually it doesn't?. Jesus Reyes A. > Thank you again, Panagiotis > > > Στις 20-02-2006, ημέρα Δευ, και ώρα 15:30 -0600, ο/η Jesus Reyes έγραψε: > > --- Panagiotis Sidiropoulos <[EMAIL PROTECTED]> escribió: > > > > > > You can compile your self, the project is in: > > > > lazarus/examples/turbopower_ipro. > > > > > > I thought I did test this example. At least it is not the same > > > comparing > > > screens. > > > > > > > mmm, probably I did a small change but it should not affect > > > > rendering, anyway, I can send you both source code and binaries > > > for > > > > gtk1 and gtk2 but it will be an attachment of about 7.5MB. If > > > it's ok > > > > tell me. > > > > > > It is OK with me. Do you have any ftp server to upload it? This > > > would be > > > very convenient. > > > > http://mx.geocities.com/jesusrmx/lazarus/tpiprosamples.zip > > > > Once you download the file, change extension from .zip to .tar.bz2 > > I don't know why geocities doesn't like .tar.bz2, it seems happy with > > .tar.gz > > > > > > > > > As a side note, when using gtk2 there are some messages about: > > > > "Pango-WARNING **: Invalid UTF-8 string passed to > > > > pango_layout_set_text()", also I tried to open the html file with > > > > kate, i'm not completly sure but I think it should understand > > > UTF-8 > > > > but it didn't show greek characters correctly, only when I > > > > especifically set the charset encoding to iso-8859-7 or cp1253 it > > > > showed greek chars correctly (I guess) > > > > > > I can't undestand it, display utf-8 text setting iso codepage? This > > > is > > > only explained if it is converted by ipHTMLPanel. By the way I > > > tried to > > > convert utf text (utf8toansi()) before display but had no luck. > > > > > > Regards, Panagiotis > > > > > > > It's weird and it require further reseach, if I manually set the > > default charset in iphtml.pas to GREEK_CHARSET and set a default font > > face that supports this charset it does almost a good job, take a > > look: > > http://mx.geocities.com/jesusrmx/lazarus/images/tpipro_gtk1_greekcharset.png > > > > Don't know if in this case it's enough with adding a property > > DefaultCharset to TIpHtmlPanel when working with gtk1, for gtk2 > > feeding correct UTF8 should be enought if not then it's probably a > > bug somewhere. Need more research. > > > > Jesus Reyes A. > > > > > > > > > > > > ___________________________________________________________ > > Do You Yahoo!? > > La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al > > mes. http://net.yahoo.com.mx > > > > _________________________________________________________________ > > To unsubscribe: mail [EMAIL PROTECTED] with > > "unsubscribe" as the Subject > > archives at http://www.lazarus.freepascal.org/mailarchives > > > > _________________________________________________________________ > To unsubscribe: mail [EMAIL PROTECTED] with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam �gratis! Reg�strate ya - http://correo.yahoo.com.mx/ _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
