Dave Coventry <[email protected]> schrieb am Mi., 14. Juli 2021, 23:14:
> Actually the MTEXT text format seems to be a char array with every
> second byte carrying the MSB of a 16 bit character.
>
> So the string "Some text" would be presented so:
> char *s={"S","\0","o,"\0","m,"\0","e,"\0","
> ,"\0","t,"\0","e,"\0","x,"\0","t,"\0",","\0"}
>
Which is exactly UCS-2. But only since r2007.
> On Mon, Jul 5, 2021 at 1:59 AM Reini Urban <[email protected]> wrote:
> >
> >
> >
> > Dave Coventry <[email protected]> schrieb am So., 4. Juli 2021,
> 20:41:
> >>
> >> H Duncan,
> >>
> >> I think I'm a little out of my depth.
> >>
> >> I'm trying to read the text in the MTEXT entity, but post 2007 format,
> >> the text array is stored as unsigned shorts, which I'm having
> >> difficulty with.
> >
> >
> >
> > That's just unicode UCS-2, the windows Unicode format.
> >
> >>
> >> ~ Dave
> >>
> >>
> >> On Fri, Jul 2, 2021 at 11:04 PM Duncan Lithgow <
> [email protected]> wrote:
> >> >
> >> > Hi Dave
> >> >
> >> > Over at osarch.org we had a chat about the pros and cons of SVG for
> technical documentation. https://community.osarch.org/discussion/170/
> >> >
> >> > I'm sure they'd love to share their progress and hear about what
> you're working on.
> >> >
> >> > Duncan
> >> >
> >> > On Fri, Jun 18, 2021 at 3:08 PM Dave Coventry <[email protected]>
> wrote:
> >> >>
> >> >> Do you know why it's only reading as 1, then?
> >> >>
> >> >> Where can I find the mechanism for reading the contents of an MTEXT
> string?
> >> >>
> >> >> On Fri, Jun 18, 2021 at 12:21 PM Reini Urban <[email protected]>
> wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> > Dave Coventry <[email protected]> schrieb am Fr., 18. Juni
> 2021, 10:10:
> >> >> >>
> >> >> >> Hi Reini,
> >> >> >>
> >> >> >> Still trying to read MTEXT.
> >> >> >>
> >> >> >> If I get the length of the text entity:
> >> >> >>
> >> >> >> Dwg_Entity_MTEXT *text = obj->tio.entity->tio.MTEXT;
> >> >> >> size_t len=strlen(text->text);
> >> >> >> fprintf(stderr, "mtext length is:%d\n",len);
> >> >> >>
> >> >> >> it gives me a length of 1.
> >> >> >>
> >> >> >> if the MTEXT entity is '\A1;1700', then the length should be 8.
> >> >> >
> >> >> >
> >> >> >
> >> >> > Yes, the string would be "\\A1;1700", so length 8
> >> >> >
> >> >> >>
> >> >> >> Or is the backslash still messing with the results?
> >> >> >>
> >> >>
> >>
>
>