Sign in Join

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

Mailing lists / fpc-pascal / 2012-09

DOM, XMLRead, XMLWrite - cwstring requirement

9 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

Somebody in the fpGUI support newsgroup raised an issue when using BOM, XMLRead units under Linux. Does the use of the DOM, XMLRead and XMLWrite units in FCL (from FPC 2.6.0) require the use of cwstring under Linux?

I'm using those units in the FPTest (Free Pascal Unit Testing Framework) project to generate XML output and I don't seem to be getting the error listed below. My projects never have the cwstring unit listed anywhere.

So what else could cause this error message?

--------------------------
My code deals with reading/writing XML files (with XMLRead and DOM) which requires cwstring or else i get an error at runtime:

"This binary has no unicodestrings support compiled in. Recompile the application with a unicodestrings-manager in the program uses clause."
--------------------------

Regards,
- Graeme -

Reply by email

Unknown author
to Graeme Geldenhuys
Graeme Geldenhuys wrote 5 lines
Hi, Somebody in the fpGUI support newsgroup raised an issue when using BOM, XMLRead units under Linux. Does the use of the DOM, XMLRead and XMLWrite units in FCL (from FPC 2.6.0) require the use of cwstring under Linux?

XMLRead uses it, yes.

We are working on removing this requirement (Inoussa created a native Object Pascal widestring manager), but we're currently stuck on dealing with a copyright requirement of the Unicode group.

Michael.

Reply by email

Graeme Geldenhuys
to Unknown author
XMLRead uses it, yes.

Umm, so how would that affect applications that normally use UTF-8 packed in AnsiString? Like fpGUI and LCL based applications.

To give you the exact example.
He has XML units he would like to unit test. He can use the FPTest Text Runner no problem, but he would prefer to use the FPTest GUI Test Runner (created with fpGUI). Under 64-bit ArchLinux the GUI Test Runner bombs 64-bit Ubuntu or OpenSUSE the GUI Test Runner runs without problems.

I'm totally baffled as to what would be the cause of the crash at runtime - just on ArchLinux.

I'm also not sure how using cwstring unit would affect fpGUI apps that use UTF-8 inside AnsiString containers. (just like LCL does)

but we're currently stuck on dealing with a copyright requirement of the Unicode group.

I saw a similar post (from a FPC developer) in the Delphi newsgroups.

Regards,
- Graeme -

Reply by email

Unknown author
to Graeme Geldenhuys
Graeme Geldenhuys wrote 6 lines
On 2012-09-28 09:41, wrote: > > XMLRead uses it, yes. Umm, so how would that affect applications that normally use UTF-8 packed in AnsiString? Like fpGUI and LCL based applications.

It depends on the encoding of the XML, I suppose ?

Show quoted text 10 lines
To give you the exact example. He has XML units he would like to unit test. He can use the FPTest Text Runner no problem, but he would prefer to use the FPTest GUI Test Runner (created with fpGUI). Under 64-bit ArchLinux the GUI Test Runner bombs 64-bit Ubuntu or OpenSUSE the GUI Test Runner runs without problems. I'm totally baffled as to what would be the cause of the crash at runtime - just on ArchLinux.

Me too :-)

I'm also not sure how using cwstring unit would affect fpGUI apps that use UTF-8 inside AnsiString containers. (just like LCL does)

It all depends on the XML.

> but we're currently stuck on dealing with a > copyright requirement of the Unicode group. I saw a similar post (from a FPC developer) in the Delphi newsgroups.

I know.
Some of us think that Embarcadero may be violating the copyright :)

We have asked clarification of the unicode group, but got no reply yet. (whether we ever will is another matter)

Michael.

Reply by email

Graeme Geldenhuys
to Unknown author
Show quoted text 5 lines
> > I'm also not sure how using cwstring unit would affect fpGUI apps that > use UTF-8 inside AnsiString containers. (just like LCL does) It all depends on the XML.

Sorry, I'm not very versed on WideString managers, so excuse if this is a dumb question. Would this (usage of cwstrings) be limited to the XML usage only (reading/writing from file), or to any place in fpGUI or my applications that use String as a data type? TfpgString is defined explicitly as AnsiString so that should be ok, but there are still lots of places (and my own projects) that use String instead.

I guess this would cause issues with API calls to external libraries too?

I know. Some of us think that Embarcadero may be violating the copyright :)

After following the posts in the Embarcadero newsgroup, I felt the same way. They are using the data from Unicode.org - repackaging it is irrelevant as far as I'm concerned.

Regards,
- Graeme -

Reply by email

Unknown author
to Graeme Geldenhuys
Graeme Geldenhuys wrote 16 lines
On 2012-09-28 10:01, wrote: >> >> I'm also not sure how using cwstring unit would affect fpGUI apps that >> use UTF-8 inside AnsiString containers. (just like LCL does) > > It all depends on the XML. Sorry, I'm not very versed on WideString managers, so excuse if this is a dumb question. Would this (usage of cwstrings) be limited to the XML usage only (reading/writing from file), or to any place in fpGUI or my applications that use String as a data type? TfpgString is defined explicitly as AnsiString so that should be ok, but there are still lots of places (and my own projects) that use String instead. I guess this would cause issues with API calls to external libraries too?

No, it is just for the XML reader, since it uses widestrings: it needs to convert the XML to something sensible. Hence it needs the widestring manager.

It can be that xmliconv may be sufficient, Sergei Gorelkin needs to comment on this.

Show quoted text 7 lines
> I know. Some of us think that Embarcadero may be violating the copyright :) After following the posts in the Embarcadero newsgroup, I felt the same way. They are using the data from Unicode.org - repackaging it is irrelevant as far as I'm concerned.

Well, the matter is not entirely clear.

That is why we decided to ask the unicode group what their opinion is on this matter.

Michael.

Reply by email

Graeme Geldenhuys
to Unknown author
No, it is just for the XML reader, since it uses widestrings:

Ah, so it only takes affect on the WideString type, not the String type. I guess from the name 'widestring manager' I should have seen that relationship. :)

Thanks Michael.

Well, the matter is not entirely clear.

Are such things ever!

That is why we decided to ask the unicode group what their opinion is on this matter.

That's the best option.

Graeme.

Reply by email

Ludo Brands
to Graeme Geldenhuys
Show quoted text 6 lines
> No, it is just for the XML reader, since it uses widestrings: Ah, so it only takes affect on the WideString type, not the String type. I guess from the name 'widestring manager' I should have seen that relationship. :)

Using cwstring does affect some ansistring functions. It comes with its own version of AnsiCompareText, AnsiStrUpper, etc. which uses the users LC_COLLATE setting.

Ludo

Reply by email

Sven Barth
to Graeme Geldenhuys: Ah, so it only takes affect on the WideString type, not the String type. I guess from the…
Graeme Geldenhuys wrote 7 lines
On 2012-09-28 10:28, wrote: > > No, it is just for the XML reader, since it uses widestrings: Ah, so it only takes affect on the WideString type, not the String type. I guess from the name 'widestring manager' I should have seen that relationship. :)

The most important tasks for the widestring manager is the conversion of WideString (and also UnicodeString) to AnsiString with a certain code page and the other way round.

Regards,
Sven

Reply by email