unclebob/fitnesse — Issue #67: Need configurable http/html encoding (not hardcoded utf8)
Author: sglebs
Created: 2012-03-06 14:23:43+00:00
State: open

Hi,

Currently fitnesse.http.Response hardcodes the charset encoding:

public static final String DEFAULT_CONTENT_TYPE = "text/html; charset=utf-8";

Unfortunately this means that the fixture receives from Fitnesse the strings in utf8 (and also requires utf8). This poses a problem for legacy projects (e.g. Delphi) which are already using some other encoding, where switching is not possible. The current workaround is, from the fixture, to call (Delphi's) Utf8Encode on every string that comes from the legacy system before replying to Fitnesse. And to call (Delphi's) Utf8Decode on every string that comes from Fitnesse into the fixture, before passing it on to the legacy code.

I was wondering if it would be possible to add support for something like:

-Dfitnesse.htmlencoding=ISO-8859-1

Note that Java already supports passing -Dfile.encoding=ISO-8859-1 , and that is why I thought of a similar solution. But it is just a suggestion. Any other solution that allows me to tell Fitnesse which encoding to use would be great (except having to fork the code myself ).

Thanks for listening.

marcio