From patchwork Mon May 16 17:45:36 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars Altenhain X-Patchwork-Id: 11882 Received: from moutng.kundenserver.de ([212.227.126.188]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DXjex-0002Dh-HR for vdr@linuxtv.org; Mon, 16 May 2005 19:45:43 +0200 Received: from p508ED57A.dip.t-dialin.net [80.142.213.122] (helo=voyager.starfleet) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML29c-1DXjer0jKb-0006Wo; Mon, 16 May 2005 19:45:37 +0200 Received: from enterprise.starfleet (enterprise [192.168.4.10]) by voyager.starfleet (Postfix) with ESMTP id CF45D2C2A16 for ; Mon, 16 May 2005 19:45:36 +0200 (CEST) From: Lars Altenhain To: vdr@linuxtv.org Subject: Re: [vdr] [ANNOUNCE] UTF-8 patch 0.0.3 with Freetype2, enAIO for vdr-1.3.24 Date: Mon, 16 May 2005 19:45:36 +0200 User-Agent: KMail/1.8 References: <4283BDAF.7060207@t-online.de> <20050515115200.GA14455@defiant.wachendorf.lan> <20050515170504.GA4089@defiant.wachendorf.lan> In-Reply-To: <20050515170504.GA4089@defiant.wachendorf.lan> MIME-Version: 1.0 Message-Id: <200505161945.36269.lars@altenhain.de> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:accc0e22d8532391820e59c77957883b X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2005 17:45:43 -0000 Status: O X-Status: X-Keywords: X-UID: 2252 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 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; }