<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">Am 14.12.2017 09:37 schrieb "Petr Kristan" <<a href="mailto:petr.kristan@epos.cz">petr.kristan@epos.cz</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi.<br>
<br>
I compile whole project with -FcUTF8, but sometimes should be useful<br>
to define string constant with CP_NONE to prevent conversions.<br>
<br>
Example:<br>
<br>
DefaultSystemCodePage:=1250<br>
variable s contains text with cp=1250<br>
<br>
s := s + '#'; //conversion because '#' has cp=65001<br>
<br>
Is possible to define '#' without cp?<br>
Or is possible to do fast string concatenation without conversion?<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">A concatenation is done without conversion if all strings have the same code page. You can enforce the code page using SetCodePage() which has a parameter to not convert the string to that code page. You can retrieve the code page using StringCodePage(). </div><div dir="auto"><br></div><div dir="auto">See also:</div><div dir="auto"><a href="https://www.freepascal.org/docs-html/rtl/system/setcodepage.html">https://www.freepascal.org/docs-html/rtl/system/setcodepage.html</a><br></div><div dir="auto"><a href="https://www.freepascal.org/docs-html/rtl/system/stringcodepage.html">https://www.freepascal.org/docs-html/rtl/system/stringcodepage.html</a><br></div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div></div>