issue-#24 Fixing the name table handling in DevLinker

Post Reply
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

issue-#24 Fixing the name table handling in DevLinker

Post by Josef Templ »

The next issue refers to number 6 in CPC1.7 rc4.
Please see http://redmine.blackboxframework.org/issues/24.
It is a simple subject in principle, but the proposed solutions are not perfect.

There is clearly a logical error in the fix by Boris Ilov (the OR is placed at the wrong position).
The fix of the name table length limitation does not take into account that names may be even larger
than 40 because the CP compiler accepts names up to 256 characters.
I have left the original fixes in the repository but I have also added a corrected version.
Please have a look at the changes and comment on them.

@Helmut: are you sure that names with Unicode characters work in DevLinker?
The handling looks very suspicious to me. It converts short strings to UTF-8.
A short string should never be converted to UTF-8 because it is in UTF-8 already.

- Josef
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#24 Fixing the name table handling in DevLinker

Post by Zinn »

Josef Templ wrote:@Helmut: are you sure that names with Unicode characters work in DevLinker?
The handling looks very suspicious to me. It converts short strings to UTF-8.
A short string should never be converted to UTF-8 because it is in UTF-8 already.
Sorry Josef, I can't find a statement inside DevLinker where a short string convert to UTF-8 again.
I find only one place where a short string is converting back to string by calling Utf8ToString.
Have you a different version of DevLinker?
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#24 Fixing the name table handling in DevLinker

Post by Josef Templ »

Helmut, you are absolutely right. There is only Utf8ToString conversion for
the log output, not for the linker output. Forget my comment.

- Josef
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#24 Fixing the name table handling in DevLinker

Post by Josef Templ »

Since there have not been any comments recently, I will create a voting tomorrow.

- Josef
Post Reply