diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2009-07-04 16:42:30 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2009-07-04 16:42:30 +0000 |
| commit | d5edcef1df9356b37e7a19c6d0f401298df9c3d5 (patch) | |
| tree | 056ccac5bb4b8cab50a90b13d8a7059d258d7363 | |
| parent | d214d07a627df39a9ab47264fa4e58b87f9f3893 (diff) | |
| download | xxv-d5edcef1df9356b37e7a19c6d0f401298df9c3d5.tar.gz xxv-d5edcef1df9356b37e7a19c6d0f401298df9c3d5.tar.bz2 | |
* add automated detect for environment with UTF-8 ('export LANG=de_DE.utf8; xxvd'), remove xxvd option --utf8
| -rwxr-xr-x | bin/xxvd | 11 | ||||
| -rw-r--r-- | doc/CHANGELOG | 2 | ||||
| -rw-r--r-- | doc/xxvd.1 | 9 | ||||
| -rw-r--r-- | doc/xxvd.sgml | 11 |
4 files changed, 13 insertions, 20 deletions
@@ -92,7 +92,6 @@ GetOptions ( "newstmpl=s" => \$PATHS->{NEWSTMPL}, "xmltv=s" => \$PATHS->{XMLTV}, "verbose=s" => \$verbose, # debug output level - "utf8" => \$useutf8, # Use encoding utf8 as data charset. "version" => \$version, # print version "nofork" => \$nofork, # switch fork off, for better debugging "kill" => \$killer, # kill old xxvd @@ -137,7 +136,7 @@ unless($nofork) { } } -setlocale (LC_ALL, ''); #From environment like 'export LANG="fr_FR"' +my $current_locale = setlocale (LC_ALL, ''); #From environment like 'export LANG="fr_FR"' # Load a config my $CFGOBJ = Config::Tiny->new(); @@ -148,6 +147,10 @@ unless($Config){ exit(1); } +# Check for environment with UTF-8 +$useutf8 = 1 if($current_locale && + ($current_locale =~ /UTF.+8/sig + || $current_locale =~ /utf8/sig)); # Install i18n system $charset = &init_locale($Config, $PATHS, $useutf8); @@ -162,6 +165,8 @@ if($cfgUsrFile ne $cfgFile) { debug sprintf('Use configuration file "%s"', $cfgUsrFile); } +debug sprintf("Used database charset '%s'", $charset); + # Check templateModul &init_template($TEMPLMOD); @@ -487,8 +492,6 @@ sub init_locale { my $useutf8 = shift; my $charset; - # use I18N::Langinfo qw(langinfo CODESET); - # $charset = langinfo(CODESET); if($useutf8){ $charset = 'UTF-8'; eval 'use utf8'; diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 087c51b..8eb7f78 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -15,7 +15,7 @@ New features: * New module to manage keywords within recordings * New import module for XML-TV sources and template for scheme based programs. New commands xn (new) xe (edit) xd (delete) xl (list) xt (manual update) -* UTF8 Support. Run 'xxvd --utf8' to use encoding utf8 as data char set. +* UTF8 Support. Run 'export LANG="de_DE.utf8"; ./xxvd' to use encoding utf8 as data char set. Common changes: * Log referrer to wrong filename, if database version mismatch @@ -5,7 +5,7 @@ \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac -.TH xxvd 1 "March 08, 2008" "" "" +.TH xxvd 1 "July 04, 2009" "" "" .SH NAME XXV \- means "Xtreme eXtension for VDR" and is a central service for the administration of the VDR and his environment. .SH SYNOPSIS @@ -15,7 +15,7 @@ XXV \- means "Xtreme eXtension for VDR" and is a central service for the adminis \fBxxvd\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu -[\fB--configfile=\fR \fIFILE\fR] [\fB--logfile=\fR \fIFILE\fR] [\fB--pidfile=\fR \fIFILE\fR] [\fB--localedir=\fR \fIDIRECTORY\fR] [\fB--moduledir=\fR \fIDIRECTORY\fR] [\fB--docudir=\fR \fIDIRECTORY\fR] [\fB--poddir=\fR \fIDIRECTORY\fR] [\fB--htmldir=\fR \fIDIRECTORY\fR] [\fB--fontdir=\fR \fIDIRECTORY\fR] [\fB--newsmods=\fR \fIDIRECTORY\fR] [\fB--newstmpl=\fR \fIDIRECTORY\fR] [\fB--xmltv=\fR \fIDIRECTORY\fR] [\fB--verbose=\fR \fILEVEL\fR] [\fB--utf8\fR] [\fB--version\fR] [\fB--nofork\fR] [\fB--kill\fR] +[\fB--configfile=\fR \fIFILE\fR] [\fB--logfile=\fR \fIFILE\fR] [\fB--pidfile=\fR \fIFILE\fR] [\fB--localedir=\fR \fIDIRECTORY\fR] [\fB--moduledir=\fR \fIDIRECTORY\fR] [\fB--docudir=\fR \fIDIRECTORY\fR] [\fB--poddir=\fR \fIDIRECTORY\fR] [\fB--htmldir=\fR \fIDIRECTORY\fR] [\fB--fontdir=\fR \fIDIRECTORY\fR] [\fB--newsmods=\fR \fIDIRECTORY\fR] [\fB--newstmpl=\fR \fIDIRECTORY\fR] [\fB--xmltv=\fR \fIDIRECTORY\fR] [\fB--verbose=\fR \fILEVEL\fR] [\fB--version\fR] [\fB--nofork\fR] [\fB--kill\fR] 'in \n(.iu-\nxu .ad b 'hy @@ -96,9 +96,6 @@ messages of XXV. >5 - Messages with dump of caller stack .RE .TP ---utf8 -Use encoding utf8 as data charset. -.TP --version Display the version number and exit. .TP @@ -110,4 +107,4 @@ Kill daemon \fBxxvd\fR. .SH AUTHOR This manual page was written by Tobias Grimm <<\*(T<tg@e\-tobi.net\*(T>>>. .PP -(March 08, 2008) +(July 04, 2009) diff --git a/doc/xxvd.sgml b/doc/xxvd.sgml index c60401a..cb1a656 100644 --- a/doc/xxvd.sgml +++ b/doc/xxvd.sgml @@ -4,7 +4,7 @@ [ <!ENTITY dhfirstname "<firstname>Tobias</firstname>"> <!ENTITY dhsurname "<surname>Grimm</surname>"> - <!ENTITY date "March 08, 2008"> + <!ENTITY date "July 04, 2009"> <!ENTITY dhdate "<date>&date;</date>"> <!ENTITY dhsection "<manvolnum>1</manvolnum>"> <!ENTITY dhemail "<email>tg@e-tobi.net</email>"> @@ -23,7 +23,7 @@ <address>&dhemail;</address> <author>&dhfirstname; &dhsurname;</author> <copyright> - <year>2005 - 2008</year> + <year>2005 - 2009</year> <holder>&dhusername;</holder> </copyright> &dhdate; @@ -50,7 +50,6 @@ <arg><option>--newstmpl=</option><replaceable>DIRECTORY</replaceable></arg> <arg><option>--xmltv=</option><replaceable>DIRECTORY</replaceable></arg> <arg><option>--verbose=</option><replaceable>LEVEL</replaceable></arg> - <arg><option>--utf8</option></arg> <arg><option>--version</option></arg> <arg><option>--nofork</option></arg> <arg><option>--kill</option></arg> @@ -169,12 +168,6 @@ </listitem> </varlistentry> <varlistentry> - <term>--utf8</term> - <listitem> - <para>Use encoding utf8 as data charset.</para> - </listitem> - </varlistentry> - <varlistentry> <term>--version</term> <listitem> <para>Display the version number and exit.</para> |
