Menu

#37 Add -encoding parameter

open
nobody
None
3
2004-10-10
2003-07-26
Anonymous
No

You are add line
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=ISO-8859-1">
into generated html files. In my comments for commits I
use national charachters (it in cp1251) and when You
include it comments into html with defined charset
ISO-8859-1 it shows in browser incorrectly.

Discussion

  • Richard Cyganiak

    Logged In: YES
    user_id=584620

    The charset declaration is mandated by the HTML spec.
    Removing it would invalidate the HTML. If it was removed, the
    local chars would appear correct in *your* browser, but not in
    *mine*, because yours assumes a default charset of cp1251
    and mine assumes windows-1252. This wouldn't solve the
    problem.

    A possible solution might be to add a -charset parameter to let
    the user specify the charset of the log file. StatCvs could then
    translate the log into something like UTF-8 encoded Unicode,
    or output the HTML using the specified encoding.

    But one point is valid: The assumption that most logs are
    ISO-8859-1 encoded might be wrong. I need more input on
    this one.

    The hassles of dealing with pre-XML tools :-(

     
  • Richard Cyganiak

    • labels: --> 448835
     
  • Richard Cyganiak

    Logged In: YES
    user_id=584620

    A recent experience: Log messages committed from the Mac OS X
    command line and written with vim will default to UTF-8. This means
    CVS logs are not unlikely to contain several different encodings, with no
    means of telling which is which.

    This makes me think that there's not much we can do here. The -charset
    switch would be nice for advanced users, though.

     
  • Richard Cyganiak

    • labels: 448835 -->
    • priority: 5 --> 3
    • summary: dont include charset in to generated html files, pls. --> Add -encoding parameter
     
  • Richard Cyganiak

    Logged In: YES
    user_id=584620

    I'm moving this to the Feature Request tracker with a new summary.

    The parameter should be called "-encoding", not "-charset".