Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2016-03

Are LazUtils - XML units still necessary ?

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Daniel Gaspary

Since FPC 3.00 has a new Unicode support I was wondering about that.

AFAIK, support to Unicode(Or only UTF8?) was the main reason to the existence of the units Laz2_Dom, Laz2_XmlRead/Write, etc.

Thanks.

Reply by email

Mattias Gaertner
to Daniel Gaspary
Since FPC 3.00 has a new Unicode support I was wondering about that. AFAIK, support to Unicode(Or only UTF8?) was the main reason to the existence of the units Laz2_Dom, Laz2_XmlRead/Write, etc.

Both supports Unicode.
The main difference is they use UTF-8 strings instead of UTF-16 strings. This saves memory and avoid conversions when using UTF-8 strings in your application.
They also have some flags like xrfPreserveWhiteSpace, which preserves indentation.

Mattias

Reply by email

Daniel Gaspary
to Mattias Gaertner
Mattias Gaertner wrote 5 lines
The main difference is they use UTF-8 strings instead of UTF-16 strings. This saves memory and avoid conversions when using UTF-8 strings in your application. They also have some flags like xrfPreserveWhiteSpace, which preserves indentation.

Thank you Mattias.

So.. Could the LazUtils Units replace the FCL-XML ones ?

Reply by email

Mattias Gaertner
to Daniel Gaspary
Show quoted text 11 lines
On Wed, Mar 9, 2016 at 9:04 PM, Mattias Gaertner wrote: > The main difference is they use UTF-8 strings instead of UTF-16 > strings. This saves memory and avoid conversions when using UTF-8 > strings in your application. > They also have some flags like xrfPreserveWhiteSpace, which preserves > indentation. Thank you Mattias. So.. Could the LazUtils Units replace the FCL-XML ones ?

Both are useful.
The FCL-XML units support more XML features and the above arguments about memory and speed works the same if your application uses UTF-16 strings.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner: On Wed, 9 Mar 2016 20:35:52 -0300 Both supports Unicode. The main difference is they use…
Mattias Gaertner wrote 14 lines
On Wed, 9 Mar 2016 20:35:52 -0300 Daniel Gaspary wrote: > Since FPC 3.00 has a new Unicode support I was wondering about that. > > AFAIK, support to Unicode(Or only UTF8?) was the main reason to the > existence of the units Laz2_Dom, Laz2_XmlRead/Write, etc. Both supports Unicode. The main difference is they use UTF-8 strings instead of UTF-16 strings. This saves memory and avoid conversions when using UTF-8 strings in your application. They also have some flags like xrfPreserveWhiteSpace, which preserves indentation.

Meanwhile this is also possible in fcl-xml AFAIK.

I think the main difference is the use of UTF8 versus UTF16.

Michael.

Reply by email