| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 | 1. Greek unicode support? #7056 | As subject... does Reginald support greek unicode character set? Or will it?
| 2. Re: Greek unicode support? #7079 | Reginald does not currently support UNICODE. Standard REXX doesn't support UNICODE. It uses ANSI-only. All strings in REXX must be ANSI, and so must the contents of a script.
I'd like to do a version of Reginald that is UNICODE, but then it wouldn't support normal REXX scripts. In fact, I'd like to do a version of REXX that alters some elements of the language to pull out a few advantages that Java and C have in their syntax, as I described in another post on this BBS.
But in the current version of Reginald, if you do happen to encounter a UNICODE string from somewhere (ie, reading it from a file, or being given it from some OS function you FUNCDEF), then Reginald does already have a built-in function to convert a UNICODE string to ANSI (and vice versa). But just don't try to use that UNICODE string with any string functions like POS, LENGTH, etc, or you'll get results you don't expect. Once you convert it to ANSI, then you can use the converted string like any other REXX string.
The CONVERTSTR function converts a string from ANSI to UNICODE, or vice versa.newstring = convertstr(string, options) string = The string to convert. options = Any of the following:
'U' = 'string' is a UNICODE string to convert to ANSI. If you don't specify 'U', then 'string' is an ANSI string to convert to UNICODE. 'V' = 'string' is the name of a variable containing the string. 'Z' = 'nul-terminate the resulting string'. | 3. Re: Greek unicode support? #7136 | http://www.stoa.org/unicode/charts/greek.html
| 4. Re: Greek unicode support? #7260 Posted by: 2005-10-20 12:47:45 | /*** Jeff
The 'V' option ('string' is the name of a variable containing the string) for CONVERTSTR function returns a null string.
You should also check if the 'Z' option ('nul-terminate the resulting string') is working.
Also the CONVERTSTR function is not documented in rexxbook.
***/
SAY "" SAY "Test 1, Does output A B C " SAY " ------" SAY " Does output 410042004300" SAY " ------------" SAY "" SAY CONVERTSTR("ABC") SAY C2X(CONVERTSTR("ABC"))
SAY "" SAY "" SAY "Test 2, Does not output A B C " SAY " --- ------" SAY " Does not output 410042004300" SAY " -- ------------" SAY "" ansi = "ABC" SAY CONVERTSTR(ansi, 'V') SAY C2X(CONVERTSTR(ansi, 'V'))
SAY "" SAY "" SAY "Test 3, Does output ABC" SAY " ---" SAY " Does output 414243" SAY " ------" SAY CONVERTSTR(CONVERTSTR("ABC"), 'U') SAY C2X(CONVERTSTR(CONVERTSTR("ABC"), 'U'))
SAY "" SAY "" SAY "Test 4, Does not output ABC" SAY " --- ---" SAY " Does not output 414243" SAY " --- ------" SAY "" unicode = CONVERTSTR("ABC") SAY CONVERTSTR(unicode, 'UV') SAY C2X(CONVERTSTR(unicode, 'UV'))
| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
|
|