I'm re-creating some java code in b4j and have this line of java:
So in my b4j Main module i have written:
The unicode sequence is passed to a class that is part of a PDF creation library.
The java example for this library renders as the unicode sequence in a PDF document:
My b4j example renders the unicode sequence literally:
Looking at the compiled main.java source file for my b4j example the relevant line is:
Each slash in my sequence has been escaped - is this preventing the sequence from being recognised as a unicode sequence?
Is there a supported method to pass a unicode sequence from a b4j module to a library method?
Thanks.
Martin.
B4X:
String unicode = "\u20AC\u0020\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160";
So in my b4j Main module i have written:
B4X:
Dim Unicode As String="\u20AC\u0020\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160"
The unicode sequence is passed to a class that is part of a PDF creation library.
The java example for this library renders as the unicode sequence in a PDF document:
€ ‚ƒ„...†‡ˆ‰Š
My b4j example renders the unicode sequence literally:
\u20AC\u0020\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160
Looking at the compiled main.java source file for my b4j example the relevant line is:
B4X:
_unicode = "\\u20AC\\u0020\\u201A\\u0192\\u201E\\u2026\\u2020\\u2021\\u02C6\\u2030\\u0160";
Each slash in my sequence has been escaped - is this preventing the sequence from being recognised as a unicode sequence?
Is there a supported method to pass a unicode sequence from a b4j module to a library method?
Thanks.
Martin.