我想在GeneXus中使用下面的Java语句,但是我不知道GeneXus用于嵌入式Java代码的语法。
str = new String(str.getBytes("8859_1"), "UTF-8");我该怎么做呢?
发布于 2015-07-28 19:44:16
&str = 'my text'
JAVA [!&str!] = new String([!&str!].getBytes("8859_1"), "UTF8");Documentation Link
发布于 2015-08-27 08:50:19
作为following.Without异常需要异常控制,会出现java.io.UnsupportedEncodingException错误。
&str =‘文本’
JAVA try { !&str!=新字符串(!&str !.getBytes("UTF-8"));} catch (java.io.UnsupportedEncodingException e) { }
发布于 2015-10-20 22:38:06
Para包括codigo java,necesitas usar la palabra reservada "java“al principio de cada linea.我们需要一个变量/属性为de GeneXus,o que esa可变可访问的GeneXus,必须作为亲爱的变量!...!就像你的codigo quedaria:
java try {
java [!&str!] = new String([!&str!].getBytes("8859_1"), "UTF-8");
java } catch (Exception ex) {
...
java }https://stackoverflow.com/questions/31667252
复制相似问题