WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TED for TC11.0 (64-bit)  (Read 3971 times)

Offline Fven

  • Newbie
  • *
  • Posts: 29
TED for TC11.0 (64-bit)
« on: March 04, 2020, 04:00:34 AM »
Hello,
I saw on the forum that there is a x86 version of TED for TC10 and TC11.0 available. TED Word Processor. I would like to use this extension. Is it possible to add TED to the 64-bit version of TC11.0?
« Last Edit: March 04, 2020, 04:02:41 AM by Fven »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: TED for TC11.0 (64-bit)
« Reply #1 on: March 04, 2020, 04:34:24 AM »
posted

Offline Fven

  • Newbie
  • *
  • Posts: 29
Re: TED for TC11.0 (64-bit)
« Reply #2 on: March 04, 2020, 09:25:59 AM »
Thanks Juanito

Offline Fven

  • Newbie
  • *
  • Posts: 29
Re: TED for TC11.0 (64-bit)
« Reply #3 on: March 20, 2020, 12:54:03 PM »
Dear Juanito,
There is a problem with the Ted extension. When I save a document, I cannot open it. I compiled Ted with Linux Mint and it works fine. Do you have any idea what causes this. I am learning how to create an extension but I have the same problem.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: TED for TC11.0 (64-bit)
« Reply #4 on: March 20, 2020, 01:15:33 PM »
Hi Fven
... When I save a document, I cannot open it. ...
Do you see any error messages if you open that  document  through a terminal:
Code: [Select]
Ted document

Offline Fven

  • Newbie
  • *
  • Posts: 29
Re: TED for TC11.0 (64-bit)
« Reply #5 on: March 20, 2020, 02:13:45 PM »
Thanks Rich for your quick response.

When I open test.rtf, Ted doesn't recognize the .rtf file.
Code: [Select]
tc@box:/mnt/sdb1/tce$ Ted test.rtf
textConverter.c(432) tc->tcNativeEncodingName="CP1252" tc->tcIconvFrUtf8=0xffffffffffffffff
docRtfWriteText.c(160) produced=-1
When I save a document I get this error several times.

When I open a document written with Ted I get the following error messages
Code: [Select]
docRtfReadText.c(104) upto=-1
docRtfReadRtf.c(358) len=1
docRtfReadRtf.c(416) len=1
docRtfReadRtf.c(723) controlWord="fcharset" res=-1
docRtfReadRtf.c(560) rval=-1
docRtfReadFontTable.c(215) rcw->rcwWord="f" arg=0
docRtfReadRtf.c(159) rrc->rrCurrentLine=4 rcw->rcwWord="f" arg=0
docRtfReadRtf.c(780) res=-1 controlWord="f"
docRtfReadRtf.c(560) rval=-1
docRtfReadFontTable.c(304) rcw->rcwWord="fonttbl" arg=-1
docRtfReadRtf.c(159) rrc->rrCurrentLine=4 rcw->rcwWord="fonttbl" arg=-1
docRtfReadRtf.c(780) res=-1 controlWord="fonttbl"
docRtfReadRtf.c(560) rval=-1
docRtfRead.c( 66) rcw->rcwWord="rtf" rval=-1
docRtfReadRtf.c(159) rrc->rrCurrentLine=4 rcw->rcwWord="rtf" arg=1
docRtfRead.c(134) 1=1

Ted responds with the message: "File is not in Rich Text Format. Open anyway?"

Code: [Select]
^CtextConverter.c(432) tc->tcNativeEncodingName="CP1252" tc->tcIconvFrUtf8=0xffffffffffffffff
docRtfWriteText.c(160) produced=-1
textConverter.c(432) tc->tcNativeEncodingName="CP1252" tc->tcIconvFrUtf8=0xffffffffffffffff
docRtfWriteText.c(160) produced=-1

Unfortunately I can't show you the text from the screen.
Copy and Paste also doesn't work.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: TED for TC11.0 (64-bit)
« Reply #6 on: March 20, 2020, 02:31:23 PM »
Hi Fven
It appears to be character set related:
Quote
textConverter.c(432) tc->tcNativeEncodingName="CP1252" tc->tcIconvFrUtf8=0xffffffffffffffff
I think  CP1252  is a Windows character set, and  FrUtf8  might refer to a French UTF8 encoding. Maybe you need and extension
that provides CP1252?


Offline Fven

  • Newbie
  • *
  • Posts: 29
Re: TED for TC11.0 (64-bit)
« Reply #7 on: March 20, 2020, 02:38:56 PM »
Thanks Rich, it will be a challenge

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: TED for TC11.0 (64-bit)
« Reply #8 on: March 20, 2020, 02:40:56 PM »
Hi Fven
On second thought, I think the messages is saying it's using the CP1252 character set:
Quote
tc->tcNativeEncodingName="CP1252"

but can't find a French UTF charcter set:
Quote
tc->tcIconvFrUtf8=0xffffffffffffffff

That  0xffffffffffffffff  looks like a bad pointer, or maybe simply an error since 0xffffffffffffffff is hex for -1.

Offline Fven

  • Newbie
  • *
  • Posts: 29
Re: TED for TC11.0 (64-bit)
« Reply #9 on: March 20, 2020, 02:51:32 PM »
Quote
That 0xffffffffffffffff looks like a bad pointer, or maybe simply an error since 0xffffffffffffffffff is hex for -1.
That is going to be a problem. The programming language C says nothing to me

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: TED for TC11.0 (64-bit)
« Reply #10 on: March 21, 2020, 01:06:09 AM »
Hi Fven
I reproduced the problem. Installing  glibc_gconv.tcz  seems to fix it.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: TED for TC11.0 (64-bit)
« Reply #11 on: March 21, 2020, 01:28:09 AM »
Hi Juanito
When I tried  Ted  in TC10 x86 the problem was not reproducing. Turns out I had  mtools  onboot which depends on  glibc_gconv.tcz.
So the TC10 and TC11 x86 dependency files need updating too.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: TED for TC11.0 (64-bit)
« Reply #12 on: March 21, 2020, 01:45:38 AM »
done - thanks  :)

Offline Fven

  • Newbie
  • *
  • Posts: 29
Re: TED for TC11.0 (64-bit)
« Reply #13 on: March 21, 2020, 08:22:00 AM »
Hi Rich.
I had never discovered that. How did you find out that an extension was missing?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: TED for TC11.0 (64-bit)
« Reply #14 on: March 21, 2020, 09:14:05 AM »
Hi Fven
I had never discovered that. How did you find out that an extension was missing?
It involved 1 part detective work plus 1 part dumb luck.

I downloaded the source package.
The error message says the error occurred in the file  textConverter.c  at  line 432:
Code: [Select]
textConverter.c(432) tc->tcNativeEncodingName="CP1252" tc->tcIconvFrUtf8=0xffffffffffffffff
Line 432 (SXDEB .... ) which prints the error message occurred because  tc->tcIconvFrUtf8  equaled  -1 (0xffffffffffffffff):
Code: [Select]
    if  ( (iconv_t)tc->tcIconvFrUtf8 == (iconv_t)-1 )
{
SXDEB(tc->tcNativeEncodingName,tc->tcIconvFrUtf8);
return -1;

Looking further up in the file to see where  tc->tcIconvFrUtf8  gets set to  -1  (line 402) I find:
Code: [Select]
    tc->tcIconvFrUtf8= (struct TextConverterImpl *)
    iconv_open( tc->tcNativeEncodingName, "UTF-8" );

Reading the man file for  iconv_open  to see what this function does, I noticed it says running:
Code: [Select]
iconv --listwill tell you what character sets are available. I checked to see which extension provided  iconv, it was  glibc_apps.tcz. But that
didn't fix the problem.

Here comes the dumb luck part. I noticed the  glibc_gconv.tcz  which contained a bunch of character conversion libraries. So I
tried it and it worked. I then removed  glibc_apps.tcz  to verify it was not required as part of the fix.