[sword-devel] "About" text in ChiNCV[st]
Peter von Kaehne
refdoc at gmx.net
Sun Jun 15 01:53:15 MST 2008
Not being a programmer and all, but I think we should simply re-issue
all non UTF8 conf files.
It saves hassle in the long term.
Peter
Troy A. Griffitts wrote:
> Not to open a can of worms again right now (maybe soon), but the About
> entries are RTF markup, currently. You can run them through an RTFHTML
> filter if that is the output you expect
>
> RTFHTML convertor();
> SWBuf about =((SWModule *)m)->getConfigEntry("About");
> convertor.processText(about);
>
>
> This SHOULD work. If it doesn't, we should fix it.
>
> -Troy.
>
>
>
>
> DM Smith wrote:
>> On Jun 14, 2008, at 9:31 AM, Karl Kleinpaste wrote:
>>
>>
>>> These modules' "About" texts use \uNNNN encoding. They display fine
>>> in
>>> the Windows UI but are uninterpreted in GnomeSword.
>>>
>>> The GS code just invokes ((SWModule *)m)->getConfigEntry("About").
>>> How
>>> is an interpretation expected to be imposed on that, so that \uN gets
>>> interpreted properly?
>>>
>> It also doesn't work at:
>> www.crosswire.org/sword/modules/ModInfo.jsp?modName=ChiNCVs
>> http://www.crosswire.org/study/fulllibrary.jsp?show=ChiNCVs
>>
>> There is a module in beta, turntb, which has these codes too.
>>
>> Basically the code is \\uXXXXXy
>> where XXXXX is a signed 16 bit number. So just rip it off, convert to
>> a digit and then add 65535 if < 0. The resulting 16 bit unsigned
>> number is unicode. It would need to be split into two bytes and
>> stuffed into a char array.
>> The first X can be - but after that it can only be [0-9], the first
>> non-digit, y, is the "substitution" character to be used if unicode
>> cannot be handled. Typically the substitution character is a '?'.
>>
>> This is mentioned in the wiki, though there is a typo. It gives
>> \q{num}? rather than \u{num}?
>> See: http://www.crosswire.org/wiki/index.php/DevTools:Modules#Creating_a_.conf_File
>>
>> I've added the code to JSword, so it handles it. To my knowledge,
>> there is no code in SWORD to convert it to unicode. I can provide
>> JSword's code as a pattern, if needed.
>>
>> That said, the RTF handling of BibleCS allows for unicode in RTF
>> without codes. I'd like to recommend that these three modules' confs
>> be changed to have real unicode and that we don't permit them in the
>> future.
>>
>>
>>
>> In Him,
>> DM
>>
>>
>>
>> _______________________________________________
>> 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
>>
>
>
> _______________________________________________
> 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