Forum > General

Unicode resourcestring

(1/4) > >>

zamtmn:
Is it possible in the future to split resource strings into utf8 and utf16? of course, everything is working now, but we have to fight with warnings

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program Project1;resourcestring  rstest='blbla-blbla';var  vtest:unicodestring;begin  vtest:=rstest;end. >>project1.lpr(7,10) Warning: Implicit string type conversion from "AnsiString" to "UnicodeString"

PascalDragon:
We are currently working on a UnicodeString based RTL. In that RTL (but not the Ansi-RTL) resource strings will be UnicodeString, otherwise they won't.

zamtmn:
that is, for something like this:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program Project1;resourcestring  rstest='blbla-blbla';  rstest1:unicodestring='blbla-blbla';  rstest2:ansistring='blbla-blbla';beginend.there is no hope((

jcmontherock:
@PascalDragon:

Which UnicodeString ? UTF-8 or UTF-16 ?

PascalDragon:

--- Quote from: zamtmn on February 02, 2023, 09:29:42 pm ---that is, for something like this:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program Project1;resourcestring  rstest='blbla-blbla';  rstest1:unicodestring='blbla-blbla';  rstest2:ansistring='blbla-blbla';beginend.there is no hope((

--- End quote ---

Correct.


--- Quote from: jcmontherock on February 02, 2023, 09:54:34 pm ---@PascalDragon:

Which UnicodeString ? UTF-8 or UTF-16 ?

--- End quote ---

When I said UnicodeString I meant UnicodeString. With that information you should know which encoding is used.

Navigation

[0] Message Index

[#] Next page

Go to full version