Opened 11 years ago

Closed 11 years ago

#430 closed defect (fixed)

compiler varnings regarding multi-character character

Reported by: Peter Johansson Owned by: Peter Johansson
Priority: major Milestone: svndigest 0.8
Component: core Version: trunk
Keywords: Cc:

Description

I get these warnings

../../lib/HtmlBuf.cc:41:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:42:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:43:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:44:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:45:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:46:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:47:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:48:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:49:8: warning: multi-character character constant
../../lib/HtmlBuf.cc:50:8: warning: multi-character character constant

Change History (7)

comment:1 Changed 11 years ago by Peter Johansson

Milestone: svndigest 0.x+svndigest 0.8
Owner: changed from Jari Häkkinen to Peter Johansson
Status: newassigned

comment:2 Changed 11 years ago by Peter Johansson

(In [987]) refs #430. adding a test for HtmlStream? class, which currently fails.

comment:3 Changed 11 years ago by Peter Johansson

The problem is that UTF-8 uses 1-4 bytes per character while the design of HtmlBuf sort of assumes one byte per character. We have for example a map from char (one byte) to a string. This class needs to be reimplemented to handle the variable byte length.

comment:4 Changed 11 years ago by Peter Johansson

A question arises should svndigest support both UTF-8 and ISO-8859? Version 0.7 (and older) cannot handle UTF-8 input very well. See for example here:

http://cbbp.thep.lu.se/~jari/svndigest/svndigest/blame_output/AUTHORS.html

Now we want svndigest to work as expected when the input is encoded in UTF-8, but should it also work when the input file is encoded in ISO-8859, or?

Fixing the output for UTF-8 is my highest priority, but we shuould think about the support for ISO-8859, which practically s to be backwards compatible.

comment:5 Changed 11 years ago by Jari Häkkinen

I would expect many repositories to be in ISO-8859 (and some in other encoding). Let us not forget that most of the characters are the same over different encodings and this problem relates mostly non-code text.

comment:6 Changed 11 years ago by Peter Johansson

(In [990]) just to avoid compiler warnings. refs #430

comment:7 Changed 11 years ago by Peter Johansson

Resolution: fixed
Status: assignedclosed

(In [991]) closes #430. Declare in HTML header that output is encoded in UTF-8. HtmlBuf? only massages characters that are special mark-up characters. We do not massage non-ascii chars such as umlaut and friends because most modern browsers should be able to display those anyway, and if they don't it is not crucial as it typically only involves comments in the blame output.

Note: See TracTickets for help on using tickets.