Recent

Author Topic: Tfpdxfbridge write to dxf and codepage.  (Read 3076 times)

wekwejt.com

  • New Member
  • *
  • Posts: 10
Tfpdxfbridge write to dxf and codepage.
« on: December 28, 2021, 11:49:35 pm »
Hi Guys!
I need to use in my project saving to dxf file.
I don't have any knoledge about dxf format, so I'm testing demo  https://github.com/jmpessoa/tfpdxfbridge
I found problem with polish diacritic marks.
The text inside dxf file seems to be ok but opening with Autocad I see just question marks instead.
I think have I problem with a code page? And how to solve it?
Demo unit attached.

Thank you for help.

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: Tfpdxfbridge write to dxf and codepage.
« Reply #1 on: December 29, 2021, 04:06:54 am »
As far as I understand, the version of the saved dxf file is not specified, so it is saved in old DOS dxf12 format.
dxf12 doesn't know anything about utf8, you have to recode all saved strings to ansi codepage

wekwejt.com

  • New Member
  • *
  • Posts: 10
Re: Tfpdxfbridge write to dxf and codepage.
« Reply #2 on: December 29, 2021, 10:08:47 pm »
I did this and it works:


procedure TFPDxfWriteBridge.SaveToFile(path: string);
begin
  //ToDxf.SaveToFile(path);
  ToDxf.SaveToFile(path,TEncoding.ANSI);
end;

 

TinyPortal © 2005-2018