[Bug 302467] Re: cvs2cl outputs bad xml from mixed charset log messages

shizuto shizuto2004-bug at yahoo.it
Fri Nov 28 22:47:53 UTC 2008


** Summary changed:

- cvs2cl outputs raw log messages without enclosing CDATA section, in xml mode
+ cvs2cl outputs bad xml from mixed charset log messages

** Description changed:

  Binary package hint: cvs2cl
  
  Environment information:
  Description:    Ubuntu 8.04.1
  Release:        8.04
  Package: cvs2cl 2.59-2
  
- What I expected: well-formed xml outputted independently from input data's charset, e.g. by using CDATA sections;
- What happened instead: wrong xml, letting mixed charset input data break any xml validation.
+ What I expected: well-formed xml outputted independently from input data (e.g. mixed charsets);
+ What happened instead: wrong xml, letting mixed charsets in input data break any xml validation.
  
  Scenario: serving my cvs changelog as an html page, by getting it as xml and then applying an xslt transformation:
- ( cvs -d /var/my_repo rlog ) | cvs2cl --rcs /var/my_repo --xml --xml-encoding=utf-8 --stdin --stdout | xsltproc /usr/local/etc/cl2html-ciaglia.xslt -
+ ( cvs -d /var/my_repo rlog ) | cvs2cl --rcs /var/my_repo --xml --xml-encoding=utf-8 --stdin --stdout | xsltproc my_stylesheet.xslt -
  
  When a CVS repository is accessed from many different operating systems, you will collect log messages with mixed text encoding, say utf-8, iso-8859-1, etc.
- cvs2cl will output those messages in a <msg /> tag "as is", letting you choose just one encoding by the --xml-encoding option.
- This breaks any xsltproc transformation because of invalid charset.
- 
- WORKAROUND: i edited /usr/bin/cvs2cl at line 866 this way:
- $text = "<msg><![CDATA[${text}]]></msg>\n";
- ========
+ cvs2cl will output those messages in a <msg /> tag "as is", assuming just one encoding by the --xml-encoding option.
+ This breaks any xsltproc transformation because of invalid utf-8 charset.
+ Giving --xml-encoding=iso-8859-1 passes validation, but utf-8 log messages are corrupt.

-- 
cvs2cl outputs bad xml from mixed charset log messages
https://bugs.launchpad.net/bugs/302467
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list