Language supporting for generated documentation
Free documentation system for Delphi / Pascal with JavaDoc support.
Status: Beta
Brought to you by:
trident
I found it's amazing that DelphiCodeToDoc IS ABLE TO
SUPPORT non-English output in generated documentation.
I wrote Chinese comments in my source files and
DelphiCodeToDoc does handle them corretly!
But since the <meta> label doesn't include charset
parameter,sometimes the charactors are displayed
incorrectly.
So,why not add multi-language support into
DelphiCodeToDoc? Just generate a additional parameter!
But there two charset for Chinese.One is gb2312 for
Simplified Chinese,and the other one is big5 for
Traditional Chinese.
Anonymous
Logged In: YES
user_id=248829
Yes, Rui N. helps me few month ago to support double byte
character.
You can have details in this Tracker :
https://sourceforge.net/tracker/index.php?
func=detail&aid=930775&group_id=96281&atid=614258
I was thinking most WebBrowser will autodetect the code
page, but as you said, maybe it is not sufficient.
So maybe I can add a new option to select the charset, if
there is no other way to detect it.
It is ok for you if I add an option in the setup ?
Logged In: YES
user_id=1050853
Yes,most browsers detect the codepage automatically.But
when the non-English content is very little,they usually
make mistakes.
It's better to add an option in the configuration page,in
my opinion.
BTW:I found sth interesting.When I unchecked "Allow Html in
Description",the Chinese comments will go shit sometimes.I
checked the page source and found some bytes in my double-
byte characters are converted into special escape sequence
such as "²âÊÔ£"
Oh,my god!
Also,there is another bug: sometimes,when the name of
members in a class is too long,DCTD will generate a wrapped
hyperlink!
Here I attached a file.You can use it to test DCTD.
Thx!
Use it to test
Logged In: YES
user_id=1050853
I found some HTML files generated by DCTD have strange
names such as
DecodeSingleB64Message_0AF1.htm,sometimes.This caused
corrupted hyperlink.
I tried to compile DCTD myself in D5.But after I installed
JVCL(96M after extraction!),modified some DCTD's code to
fit D5....At last I found I MUST have D6 to compile DCTD!!!
Logged In: YES
user_id=248829
I'm calling JvStr2Html.StringToHtml() method to convert
string to HTML. But now you ask, it seems it works the
wrong way !
I will have a look to your file, thx !
I'm using a file suffix to differentiate overloaded method
(same name). But normaly, the link is working well ! Have
another test file ?
I'm working with Delphi7 Pro.
Library used in project
*DelphiCodeToDoc need the stable release of JCL&JVCL to
compile: Package JVCL300CompleteJCL195-Build1848.
It includes :
-Jedi Code Library, Release 1.95
-JEDI VCL v3.00 for D5-D7
-Download this really nice work here :
http://jvcl.sourceforge.net/
Logged In: YES
user_id=1050853
OK
I think I know why.
In JvStrToHtml.StringToHtml,he writes:
for I := 1 to Len do
for J := Low(Conversions) to High(Conversions) do
if Value[I] = Conversions[J].Ch
then //incompatible!
begin
Inc(AddLen, StrLen(Conversions[J].Html) - 1);
Break;
end;
Here it treat input as "single-byted character system".But
on some DBCS inputs,it will
get a shit.Because in DBCS,two bytes(all > 128 ) are
combined to figure a character.Not only Chinese,but also
Russian,Japanese...So I do HTML encoding myself.
=======>>>wrapped hyperlink!
=======I will have a look to your file.
Sorry!In fact,it's the same bug caused by suffix!Not
wrapped!I made a wrong judgement!
Yes,I re-tested the feature.It only happens on the
methods.I don't think you're lacking of test files on this
topic.Because I tried your ParseTreeNode.pas and it also
showed me the wrong link :-)
I must point out that the TOC part has CORRECT links!
This bug ONLY emerges in the method pages.
Also,there is a difference between our test environments:
You are using a SBCS system while I use a DBCS one.But I
don't think it affects the hyperlink!
I'll take another effort to compile DCTD.
At last,forgive me for my poor English,please.
the TOC part has CORRECT links
Another file for test
Logged In: YES
user_id=1050853
I should say Good Morning to you!Though it's afternoon at
China.
I must say I solved the "suffix"!
Well,here's some code you wrote in TDOCGenHTML.AddToolBar
[L_Previous, PreviousItem.Name]),
PreviousItem.Name)
NextItem.Name]), NextItem.Name)
I think they generates the links.When there's no overloaded
member, TDOCTemplate.Name=TDOCTemplate.GetFileName.If there
is an overloaded
member,TDOCTemplate.Name<>TDOCTemplate.GetFileName.
You save files named by GetFileName while generate links
with Name.Here it is!
I changed them into
[L_Previous, PreviousItem.Name]),
PreviousItem.GetFileName)
NextItem.Name]), NextItem.GetFileName)
And everything goes well!
Logged In: YES
user_id=248829
Ok, I hadn't understand it was in the toolbar.
Ok, I reproduced the bug with your file, and accpeted your
fix. Good work ! thx a lot .
I will now work on
'JvStrToHtml.StringToHtml'
Logged In: YES
user_id=1050853
I think such convert MUST depend on the codepage.So I will
try to write an alternative function for it.
I like DCTD.
Please inform me before the official release.
Logged In: YES
user_id=248829
I will check if it is fixed in JCL library.
I will keep you informed.
next revision should be around 15 April.
Logged In: YES
user_id=1050853
Thank you
Time is enough waiting the hotfix of JCL
You know, if a label '<object ' is put into comments,it
will cause strange scene.
html label in comments