[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with UTF-8 problem (once more)

[Andreas Tille]
> I have given up for today because I lost any hope to find a clue
> about this what I would regard as a bad implementation of encoding
> handling.

I suspect the method used by popcon might be the correct way.  It adds
:utf8 to the open call to document the encoding.  Here is an untested
patch to implemnt it.

Index: /home/pere/src/debiancvs/debiancddsvn/cdd/devtools/cdd-gen-control
--- /home/pere/src/debiancvs/debiancddsvn/cdd/devtools/cdd-gen-control  (revision 948)
+++ /home/pere/src/debiancvs/debiancddsvn/cdd/devtools/cdd-gen-control  (working copy)
@@ -425,7 +425,7 @@

 sub load_task {
     my ($taskfile, $curpkg) = @_;
-    open(TASKFILE, "<$taskfile") || die "Unable to open $taskfile";
+    open(TASKFILE, "<:utf8", $taskfile") || die "Unable to open $taskfile";
     my $line;

     $taskinfo{$curpkg} = ();
@@ -600,7 +600,7 @@
     # read taskcontrolfile and find priorities
     print STDERR "Reading task control file.\n" if $debug;
-    open(PRIO,$taskcontrolfile) || die("Unable to read task control file.");
+    open(PRIO,"<:utf8", $taskcontrolfile) || die("Unable to read task control file.");
     while (<PRIO>) {
         chomp ;
        if ( $_=~/^$prio\s*:\s*([-\w]+)/) {

> I do not like to do so because sooner or later we will hit the
> problem again and thus I'll leave the task in for the web page
> rendering until the problem is solved.  But I wonder what you would
> regard as a reasonable behaviour when "Metapackage: false" is set:
> Should an entry for the web pages be rendered if there is no
> metapackage but just a tasksel task or should it be left out?

Not quite sure, but suspect we should show all packages listed in the
educational tasks, even the "hidden" ones.

Happy hacking,
Petter Reinholdtsen

Reply to: