Opened 7 months ago

Closed 6 months ago

#7122 closed enhancement (fixed)

DXF: Allow user to disable text unescaping

Reported by: Alan Thomas Owned by: warmerdam
Priority: low Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: dxf
Cc:

Description

Split out from #4369:

ACTextUnescape

  • In this function some DXF escape sequences are translated and stored into a resulting string. At the moment not all possible sequences are translated. Some of the possible sequences have to do with the formating (of somtimes only parts) of the text, like color codes, italic, font descriptions, etc. I think that it is not always useful to remove these kind of informations. (For instance I am using most of the formating informations in a DXF viewer. Without the formating information I could not display the text in the correct way.) Therefore I have introduced the new config option "DXF_TRANSLATE_ESCAPE_SEQUENCES". Setting this option to FALSE prevents the translation. In the future maybe it would make sense to translate only those escape sequences, which deal e.g. with UTF8.

There is a partial list of AutoCAD escape sequences at http://www.cadforum.cz/cadforum_en/text-formatting-codes-in-mtext-objects-tip8640. We could certainly do a better job of stripping these for the majority of users who aren't interested in rich text, but obviously some clients would like to preserve this data, so providing this configuration flag makes sense.

Change History (1)

comment:1 Changed 6 months ago by Alan Thomas

Resolution: fixed
Status: newclosed

In 40848:

DXF: Handle all known MTEXT escapes; allow user to turn off text unescaping (fixes #7122)

Note: See TracTickets for help on using tickets.