[sword-devel] .conf files encoding/tags
Troy A. Griffitts
scribe at crosswire.org
Wed Oct 3 16:51:05 MST 2007
Eeli,
We need to distinguish 2 things. Markup and Encoding.
One markup for .conf files has been mandated for 15 years:
RTF + <a href="">
Well, the <a> was added within the last 5 years or so.
The choice was made when BibleCS was the only usable frontend for SWORD
and not many people or computers used UTF-8.
If you find any other HTML besides <a> in a .conf file, it is an error.
There are filters in SWORD which are easy to use to convert basic rtf to
basic HTML, if you want.
RTFHTML convert;
SWBuf about = module->getConfigEntry("About");
convert.processText(about);
// about is now HTML
I just looked and this filter doesn't convert the \u codes to HTML.
This should be added to this filter.
We should talk about changing the .conf file format standard, but there
is and has been a standard.
As far as encoding, I believe we decided less than a year ago that the
rule we would use is that encoding of the module would also be the
encoding of the .conf
\u codes are valid RTF markup so they are valid regardless of the encoding.
I believe I have remembered correct with all of this. If anyone else
remembers differently or if this is not transcribed somewhere official,
your input would be appreciated.
-Troy.
Eeli Kaikkonen wrote:
> I browsed through the beta area module .conf files. It's great to see
> so many new ones with new features.
>
> One rant I have. Why on earth is stupid braindead rtf or other
> strange formatting used in .conf files? See this example from TurNTB:
>
> About=New Turkish Bible translation, jointly translated and published by
> K\u00305?tab\u00305? Mukaddes \u00350?irketler (www.kitabimukaddes.com)
> and Yeni Ya\u00351?am Yay\u00305?nlar\u00305? (www.yyyayinlari.com). We
> are grateful for the permission by Yeni Ya\u00351?am
> Yay\u00305?nlar\u00305? to distribute this translation.
>
> How are the frontends supposed to display this correctly? This is year
> 2007 and this kind of project should use utf8 in conf files also. \par
> is quite easy to replace but why not use <br> instead, that kind of html
> tagging is used in many places even without real html browsers. Rtf is
> M$ proprietary format.
>
> I seriously suggest that one and only one character encoding and
> formatting tagging will be chosen and used. All old modules should be
> checked and fixed.
>
> Yours,
> Eeli Kaikkonen (Mr.), Oulu, Finland
> e-mail: eekaikko at mailx.studentx.oulux.fix (with no x)
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list