Hello,
OE: 10.2B & 11.5
I found problem with this.
This simple code demonstrate the problem:
DEFINE VARIABLE tst AS CHAR INITIAL "CONVERSION". DEFINE VARIABLE tstutf8 AS CHAR. DEFINE VARIABLE tstutf32 AS CHAR. DISPLAY SESSION:CHARSET ": " tst FORMAT "x(76)" SKIP. PAUSE. tstutf8 = CODEPAGE-CONVERT ( tst, "UTF-8" ). /*no problem*/ DISPLAY "UTF-8: " tstutf8 FORMAT "x(76)" SKIP. pause. tstutf32 = CODEPAGE-CONVERT (tstutf8, "UTF-32"). /*problem here*/ DISPLAY "UTF-32: "tstutf32 FORMAT "x(76)" SKIP. pause.
In string with CODEPAGE-CONVERT (tstutf8, "UTF-32") I get
SYSTEM ERROR: Memory violation. (49) ** Save file named core for analysis by Progress Software Corporation. (439)
OpenEdge has support UTF-32?
Hello,
OE: 10.2B & 11.5
I found problem with this.
This simple code demonstrate the problem:
DEFINE VARIABLE tst AS CHAR INITIAL "CONVERSION".
DEFINE VARIABLE tstutf8 AS CHAR.
DEFINE VARIABLE tstutf32 AS CHAR.
DISPLAY SESSION:CHARSET ": " tst FORMAT "x(76)" SKIP. PAUSE.
tstutf8 = CODEPAGE-CONVERT ( tst, "UTF-8" ). /*no problem*/
DISPLAY "UTF-8: " tstutf8 FORMAT "x(76)" SKIP. pause.
tstutf32 = CODEPAGE-CONVERT (tstutf8, "UTF-32"). /*problem here*/
DISPLAY "UTF-32: "tstutf32 FORMAT "x(76)" SKIP. pause.
In string with CODEPAGE-CONVERT (tstutf8, "UTF-32") I get
SYSTEM ERROR: Memory violation. (49)
** Save file named core for analysis by Progress Software Corporation. (439)
OpenEdge has support UTF-32?
Flag this post as spam/abuse.
As per documentation:
"OpenEdge supports Unicode's UTF-8 encoding. In addition, all varieties of UTF-16 and UTF-32 are supported for input and output and for LONGCHARs and CLOBs."
To extend Dileep's answer:
The AVM treats all CHARs as encoded as -cpinternal. Your CONVERT-CODEPAGE is converting the CHAR from its -cpinternal representation to UTF-32 representation, storing it in a CHAR var. The AVM will still treat this CHAR var as -cpinternal, and since it is actually UTF-32, it mishandles the string.
What is you are are trying to do with tstutf32? If you are trying to write it out to file, you might try OUTPUT TO CONVERT TARGET "UTF-32".
Hello,
OE: 10.2B & 11.5
I found problem with this.
This simple code demonstrate the problem:
DEFINE VARIABLE tst AS CHAR INITIAL "CONVERSION".
DEFINE VARIABLE tstutf8 AS CHAR.
DEFINE VARIABLE tstutf32 AS CHAR.
DISPLAY SESSION:CHARSET ": " tst FORMAT "x(76)" SKIP. PAUSE.
tstutf8 = CODEPAGE-CONVERT ( tst, "UTF-8" ). /*no problem*/
DISPLAY "UTF-8: " tstutf8 FORMAT "x(76)" SKIP. pause.
tstutf32 = CODEPAGE-CONVERT (tstutf8, "UTF-32"). /*problem here*/
DISPLAY "UTF-32: "tstutf32 FORMAT "x(76)" SKIP. pause.
In string with CODEPAGE-CONVERT (tstutf8, "UTF-32") I get
SYSTEM ERROR: Memory violation. (49)
** Save file named core for analysis by Progress Software Corporation. (439)
OpenEdge has support UTF-32?
Flag this post as spam/abuse.
This code works fine for me under OE 11.5:
define variable test as character no-undo initial "UTF8".
define variable testutf8 as character no-undo.
define variable testutf32 as character no-undo.
assign testutf8 = codepage-convert(test, "utf-8")
testutf32 = codepage-convert(testutf8, "utf-32", "utf-8").
Hello,
[quote user="Aidan Jeffery"]
What is the -cpinternal of your session?
[/quote]
1251 or KOI8-RL
[quote user="Aidan Jeffery"]