[ANNOUNCE] UTF-8 patch 0.0.3 with Freetype2, enAIO for vdr-1.3.24

Message ID 200505161945.36269.lars@altenhain.de
State New
Headers

Commit Message

Lars Altenhain May 16, 2005, 5:45 p.m. UTC
  Am Sonntag, 15. Mai 2005 19:05 schrieb Ludwig Nussel:
> Ludwig Nussel wrote:
> > Lars Altenhain wrote:
> > > thanks for this patch. Finally the mp3 plugin can display the correct
> > > names of the mp3s.
> > >
> > > My vdr runs since 2 days with this patch and I have found only a small
> > > error :-) If vdr is allows to update the channel names, the names
> > > revert back to the ISO8859 encoded version. The transmitted channel
> > > names are not converted to utf8 before they are stored in the config
> > > data. The attached patch fixes this.
> >
> > It cannot work this way, you blindly recode iso-8859-1 to utf8.
> > Judging from how xawtv does it each dvb string tells it's encoding.
> > Therefore the central place to recode all strings must be
> > decodeText() in libsi/si.c. That also means that the encoding does
> > not need to be configured via channels.conf.
>
> I've ripped the code from xawtv and put it into libsi. Seems to work
> fine but someone with non-german stations should probably try it to
> actually prove that.
>
For german stations this works so far, but maybe we are just lucky to get our 
EPG data in the encoding which is the default for the code from xawtv. 

While trying to get the text2skin plugin to work with an UTF8 patched vdr I 
needed to make some changes to the Freetype part of the patch. Attached is 
the updated UTF-8 patch containing this changes, as well as the changes from 
Ludwig and a patch for text2skin-1.0.

Due to the changes in the freetype part I also changed the default sizes for 
the fonts from 16, 12 and 15 to 24, 18 and 22.

Lars
  

Comments

Grégoire Favre June 14, 2005, 12:50 p.m. UTC | #1
Hello,

What's the status of utf-8 for 1.3.26 ?

Thank you very much,
  
Alexander Riedel June 14, 2005, 9:28 p.m. UTC | #2
Gregoire Favre schrieb:

>Hello,
>
>What's the status of utf-8 for 1.3.26 ?
>
>Thank you very much,
>  
>
It will be soon ready.

Regards,
Alexander Riedel
  

Patch

diff -ruN --exclude='*~' text2skin-1.0.orig/graphtft/font.c text2skin-1.0/graphtft/font.c
--- text2skin-1.0.orig/graphtft/font.c	2005-05-16 16:09:32.000000000 +0200
+++ text2skin-1.0/graphtft/font.c	2005-05-16 18:09:40.000000000 +0200
@@ -41,6 +41,7 @@ 
 	if ( _cache.find(CacheName) != _cache.end() )
 		return true;	
 	
+#ifndef UTF8PATCH
 	int error = FT_New_Face(_library, Filename.c_str(), format, &_face);
 
 	// every thing ok?
@@ -176,14 +177,23 @@ 
 		
 	}
 	// If all was ok, put the vdr font into the cache and return true
+#endif
 	cFont* newFont = NULL;
+#ifdef UTF8PATCH
+	newFont = new cFont(Filename.c_str(), Size, Width);
+#else
 	newFont = new cFont(font_data);
+#endif
 	if (newFont) {
 		_cache[CacheName] = newFont;
+#ifndef UTF8PATCH
 		_del[CacheName] = font_data;
+#endif
 		return true;
 	}
+#ifndef UTF8PATCH
 	delete(font_data);
+#endif
 	// Something went wrong!
 	return false;
 }