<p>Am 30.07.2017 08:07 schrieb "Bo Berglund" <<a href="mailto:bo.berglund@gmail.com">bo.berglund@gmail.com</a>>:<br>
><br>
> On Fri, 28 Jul 2017 16:35:05 +0200, Michael Schnell<br>
> <<a href="mailto:mschnell@lumino.de">mschnell@lumino.de</a>> wrote:<br>
><br>
> >On 25.07.2017 10:54, Bo Berglund wrote:<br>
> >> so I need to write efficient replacements for certain string functions (Delete, Insert, Copy etc).<br>
> >Why do you think the string function (if using strictly just a single<br>
> >UTF-8 or RawByte branded String type) are not efficient ?<br>
> ><br>
> >If all string encoding brands in an operation are the same there will be<br>
> >no conversion.<br>
><br>
> Sorry,<br>
> I was not clear in my question...<br>
><br>
> What I meant to say is that I need to convert an existing application<br>
> that uses strings (AnsiString) as binary data buffers to instead use<br>
> TBytes buffers. Thus my quest is for functions operating like the<br>
> convenient string functions but on TBytes arrays.<br>
><br>
> All of this is because I have found that using AnsiString is<br>
> triggering data changes when the application is running in certain<br>
> countries (locales) and processing certain data values...<br>
><br>
> The application was started back in Delphi7 times when "string"<br>
> actually meant AnsiString and was a 1-byte per element container.</p>
<p>You could always use RawByteString or a string with a fixed codepage instead if plain AnsiString.</p>
<p>Just declare a type alias so that you can keep it compatible with older Delphi versions as well.</p>
<p>Regards,<br>
Sven</p>