Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Michael Van Canneyt
On Sun, 29 Dec 2013, Hans-Peter Diettrich wrote: Inspired by the current Lazarus discussion I'd like to learn more about the current state of the implementation of the new AnsiStrings. In case nothing has be done yet, I'd suggest to extend TAnsiRec by the new codePage and elemSize fields

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Hans-Peter Diettrich
Michael Van Canneyt schrieb: On Sun, 29 Dec 2013, Hans-Peter Diettrich wrote: Inspired by the current Lazarus discussion I'd like to learn more about the current state of the implementation of the new AnsiStrings. In case nothing has be done yet, I'd suggest to extend TAnsiRec by the new

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Michael Van Canneyt
On Sun, 29 Dec 2013, Hans-Peter Diettrich wrote: Michael Van Canneyt schrieb: On Sun, 29 Dec 2013, Hans-Peter Diettrich wrote: Inspired by the current Lazarus discussion I'd like to learn more about the current state of the implementation of the new AnsiStrings. In case nothing has be

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Jonas Maebe
On 29 Dec 2013, at 16:25, Hans-Peter Diettrich wrote: I've heard that a mix of encodings converts the (concatenated) output (RawByteString?) to CP_ACP, with possible losses. Is this correct? The code page of ansistrings concatenations is the code page of the result to which this

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Hans-Peter Diettrich
Michael Van Canneyt schrieb: On Sun, 29 Dec 2013, Hans-Peter Diettrich wrote: This will be combined with the dotted unit filenames, to be Delphi 2010+ compatible. sigh.sigh How do I create source files for use with both versions? What do you mean by this statement ? I'm not familiar

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Hans-Peter Diettrich
Jonas Maebe schrieb: The code page of ansistrings concatenations is the code page of the result to which this concatenation is assigned/converted. For rawbytestring, this code page is CP_ACP per Delphi compatibility. This does not match my experience with Delphi XE :-( Can you give an Delphi

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Sven Barth
On 29.12.2013 17:53, Hans-Peter Diettrich wrote: Michael Van Canneyt schrieb: On Sun, 29 Dec 2013, Hans-Peter Diettrich wrote: This will be combined with the dotted unit filenames, to be Delphi 2010+ compatible. sigh.sigh How do I create source files for use with both versions? What do

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Sven Barth
On 29.12.2013 19:26, Hans-Peter Diettrich wrote: Jonas Maebe schrieb: The code page of ansistrings concatenations is the code page of the result to which this concatenation is assigned/converted. For rawbytestring, this code page is CP_ACP per Delphi compatibility. This does not match my

Re: [fpc-devel] Improving i8086 performance..

2013-12-29 Thread Kostas Michalopoulos
That emulator is not cycle-exact, so it doesn't have the same characteristics as the real hardware. PCem comes closer, but is also not exact. Well, it is better than nothing when you have no access to a real 808x machine. ___ fpc-devel maillist -

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Hans-Peter Diettrich
Sven Barth schrieb: [...] This was tested using Delphi XE (it might not compile though as I've just rewritten the code from memory as the original is on a different computer) Thanks, the code is okay, and it produces the expected results. The compiler also warns about a downcast from

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Hans-Peter Diettrich
Jonas Maebe schrieb: I'm inclined to add a global boolean variable to the system unit that allows changing this behaviour so that it uses CP_UTF8 instead in such cases (defaulting to false, for Delphi compatibility). In practice, setting it to true shouldn't cause problems even with virtually

Re: [fpc-devel] Encoded AnsiString

2013-12-29 Thread Paul Ishenin
30.12.2013 9:07, Hans-Peter Diettrich пишет: Do you think that FPC should really reproduce all this inconsistent behaviour? Who would test or even specify the compatible behaviour, when every new variation will result in more unexpected results? IMO it's much easier to do it right, and fix the