On 18/08/2019 11:57, Gabor Boros wrote: > I do not want to fight with "char"s or "byte"s. Just want to use the > easier way which have the best performance. (The original code use > strncpy.) I can use "s_n:String[sn_len]", but "String" is ShortString > and it's have CP_ACP codepage if I understand the wiki correctly. So I > need a string type with explicit defined length and with CP_NONE > codepage for a Linux/Windows multi platform application. Any idea?
That does not exist/is not supported. All strings have an associated code page, because strings are data + interpretation of that data, rather than just data. If you only want data, you have to use an array instead (or a custom record with overloaded operators that uses an array of char internally). Jonas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal