Hi Jan-Erik, thank you for the running snippet (it used a single dimensioned array instead of a double dimensioned array). Took me a while to get acquainted with AOO/LO PolyPolygons. Added some - hopefully - helpful links as comments. Also I tried to simplify the coding a little bit. However, I also added some code to demonstrate different debugging possibilities, especially uno.getDefinition(), the method and the routine. HTH, ---rony /* --> https://sourceforge.net/p/oorexx/discussion/408477/thread/cc913e54d3/...
Hi, I have difficulties to actually grasp how to do what I need/want with the info in the reference card. So here's a stand alone script that you can run without parameters and it will create a shape in the top left corner with 0 points in it, but it's not what I want. /* Script to create a Triangle in Apache OpenOffice Draw with ooRexx */ xContext = UNO.connect() -- connect to server and retrieve the XContext object xServiceManager = xContext~getServiceManager xDesktop = UNO.createDesktop( xContext...
Hi, I have difficulties to actually grasp how to do what I need/want with the info in the reference card. So here's a stand alone script that you can run without parameters and it will create a shape in the top left corner with 0 points in it, but it's not what I want. /* Script to create a Triangle in Apache OpenOffice Draw with ooRexx */ xContext = UNO.connect() -- connect to server and retrieve the XContext object xServiceManager = xContext~getServiceManager xDesktop = UNO.createDesktop( xContext...
Hi, I have difficulties to actually grasp how to do what I need/want with the info in the reference card. So here's a stand alone script that you can run without parameters and it will create a shape in the top left corner with 0 points in it, but it's not what I want. Change it to a circle and it /* Script to create a Triangle in Apache OpenOffice Draw with ooRexx */ xContext = UNO.connect() -- connect to server and retrieve the XContext object xServiceManager = xContext~getServiceManager xDesktop...
Jan-Erik, it certainly would help if you could supply a short, stand-alone example to become able to easily study the problem. Currently the overhead to research everything needed to become able to insert your snippet to study it is overwhelming, unfortunately. Maybe a few hints that might help: * in the installation directory of BSF4ooRexx (e.g. C:\Program Files\BSF4ooRexx850) you find two pdf-files containing reference cards, "refcardBSF4ooRexx.pdf" for BSF4ooRexx, and " refcardOOo.pdf" for OpenOffice/LibreOffice;...
Hello, I have an urgent problem... to create a triangle in AOO. I've got a lot of code to allow Draw to open a pdf, adjust, read and manipulate shapes of various kinds and add rectangles, lines and circles. To create a Triangle one need to create a PolyPolygonShape and add an array containing an array of points that describe how it look. CALL UNO.loadClass "com.sun.star.awt.Point" -- How can one btw detect if this has been called if already called in a previous run?! rTriangle = .Array~Of( oo~createArray(...
EXECIO * DISKR is not suited to read binary data as it reads "lines" terminated by CR or CR/LF. So even without the NUL issue this bug report addresses, you would be unable to correctly piece together your binary data by concatenating all read "lines" as they might have been separated by either CR or CR/LF. You can read your binary data with charIn in a single call by specifiying how many bytes you want to read, or by opening the Stream with the BINARY option and read data with lineIn, like this:...
The encrypted magazine is from a series of DVDs published by National Geographic in 2009 or so. The software to read the files no longer installs. Hence the need for decryption.
Reading in a large file (249k), ooRexx only got 123K. It stopped when it reached a x00. Not yet sure where it restarted. I thought execio would be faster than 249k charins. but execio doesn't work. The 249k file is an encrypted page from a National Geographic magazine issue. Decryption is very easy, but very slow -- 249k charins, 249k charouts. Where is the source code? It cannot be that difficult to fix.
Hello Jeremy! Sorry to reply so long after you posted... Never mind, expedient solutions are welcome at any time :) Instead of [...] display the bmp. That approach works for several simulations with focus on a surface as close as possible to the role model. I've considered to do what you suggest, but for now I follow Erich's advice, and I plan to publish an "internationalisation update" of my toy within a month or so. Best, M.
On Sun, 15 Sep 2024, at 17:17, m-stgt wrote: This subject leads to another question, what I do in ooRexx here on my PC looks exactly like I programmed it. But if somebody runs it on his Windows PC in Brazil, or U.S.A, or maybe Kazakhstan -- hello Elena! :) -- will a "§" show as paragraph sign, a "^" as circumflex accent, a multiply dot as such? What must I do to ensure the same look of display no matter of a particular locale? Sorry to reply so long after you posted... Instead of expecting the user's...
Error 19.923 sometimes inaccurate
Thanks. I guess I will keep using my screen scraper that runs overnight and saves a year of entries. Just thought maybe someone might have a better way.
Hi Garry, I made a start on this some years ago. Google calendars can feed an ical. I produced a class that provided me a set of events from an ICAL file. I never completed the work as I had control over the calendar and was able to parse out the event types and recursions I wanted. However, if that was the way that you wanted to go you could get some mileage from my code. The great flexibility of the ICAL format makes it quite difficult to parse out all events, but my ical event class and the ical...
Does anyone have Rexx code to read a google calendar?
Hello Erich! I do have to retract my assertion edit control displays UTF-8 flawlessly, tree view does not. Sorry if I forwarded my confusion. Meanwhile I may precise: ooDialog static text displays on an UTF-8 enabled PC glyphs like Sigma or "lazy T" no matter if using "Courier New" or "IBM Plex Mono Medm" as font. In contrast, in ooDialog tree view this holds true only when using "Courier New". With "IBM Plex Mono Medm" Sigma will show only if prepended with a right-pointing arrow. To show a Sigma...
Hello Erich! can you provide a small test case that shows the issue? I try to boil down the issue as much as possible, sorry if my explanation is too lengthy. To show what I do you may take a look here Within the branch node "GTOs and XEQs for CAT 1" will list alpha labels, which may use characters not available in CP 1252. Up to now I replaced Sigma Σ by paragraph §, what looked funny but worked. Now with UTF-8 Sigma shows in the Display but not in a. m. tree view. With UTF-8 now a substitution...
Next issue: To append text to a multiline edit control I have to place the 'caret' past the last character. Up to now I did so with curva = pastr~lines curva = pastr~lineIndex(curva) + pastr~lineLength(curva) curva = pastr~select(curva, curva) /* no select, set caret only */ UTF-8 enabled this fails, I guess a little discrepancy in counting chars and bytes. A curva *= 3 before select helps in my case (with mainly single-byte characters). My conclusion: a PC with Beta UTF-8 enabled turns ooRexx/ooDialog...
Some more bugs: rexx -e "If 1 Then; X: Nop" correctly reports Labels are not allowed within an IF block; found "X". but rexx -e "If 1 Then X: Nop" erroneously produces Labels are not allowed within an IF block; found "IF". There is an implied semicolon after the THEN keyword, and therefore the result of both runs should be identical. Besides, the label name is not "IF".
The same happens with rexx -e "Select; When 1; X: Then Nop; End" In this case, a 18.2 is produced instead of a 47.4.
Similarly, If 1 X: Then Nop produces a 18.1, IF instruction on line 1 requires matching THEN clause. when there is clearly a THEN clause. What is invalid (using the current definition of the language) is the label , "X:". A 47.3, Labels are not allowed within an IF block; found "X". should be produced instead.
Thanks for fixing https://sourceforge.net/p/oorexx/bugs/1945/#cb5f I've found a new bug in the current code. rexx -e "If 1 Then Nop; X: Else Nop" produces Error 47.3: Labels are not allowed within an IF block; found "ELSE". We should have "X" instead of "ELSE". Please also keep in mind that you have not fixed or commented upon https://sourceforge.net/p/oorexx/bugs/1945/#e174
Hi Mike, edit control displays UTF-8 flawlessly, tree view does not can you provide a small test case that shows the issue? I'm taken all codepoints above '7F'x Can you explain this in more detail? Did you see my remark regarding naked above-'7F'x bytes vs. valid UTF-8?
Halfway success only. While ooDialog's edit control displays UTF-8 flawlessly, tree view does not. In addition I'm taken all codepoints above '7F'x within tree view. Nevertheless I'll keep UTF-8 enabled me think. /M.
Success! With your hint to Beta UTF-8 it's now the very first time my "Nut CPU firmware interpreter" may display Σ (Sigma) like the role model HP41. Because I simulate its segmented display by ordinary characters I substituted the Sigma by §, what is a stopgap -- what was a stopgap :) Thank you Erich! /M.
Hallo Erich! TY for the additional information. No sure what you mean by dual. Sorry for ambiguities. Dual-use source in the sense of same REXX program usable on Beta UTF-8 enabled Windows and also usable on not Beta UTF-8 enabled Windows. I've identified already a show-stopper: out = translate(in, ditrl) with ditrl a simple string of characters. After shifting to Beta UTF-8 the editor now files ooRexx programs UTF-8 encoded what results in ditrl being interspersed with "double-byte characters" --...
Hi Mike, it now stops at '7F'x, before it showed the complete character set The "required blank" 'A0'x is not available any more UTF-8 means valid UTF-8. A random single byte above '7F'x is illegal UTF-8. For more details check https://en.wikipedia.org/wiki/UTF-8 shows a trouser button I assume that this is just a somewhat badly rendered smiley in this font. Not every available font may be able to render all 100+K Unicode glyphs. You could try using a different font. will all user of my program have...
Same procedure as before reveals dramatic changes with Beta UTF-8 enabled, see attached screen copy. The "required blank" 'A0'x is not available any more :( Note: this is output shown in an ooDialog multiline edit control, not within a Windows cmd window. Sending 'CEA3'x to the ooDialog edit control shows as Greek capital letter sigma, thus UTF-8 encoded data seems to work. So still some hope left.
After enabling the Beta UTF-8 setting (and a reboot) there are several changes to observe: chcp in a cmd window shows "Aktive Codepage: 65001." Before it was 850. Then: C:\PRGM\rexx\ooNutFIP>pipe "xrange 20 ff!fblock 16!term" !"#$%&'()*+,-./ 0123456789:;<=>? @ABCDEFGHIJKLMNO PQRSTUVWXYZ[\]^_ `abcdefghijklmno pqrstuvwxyz{|}~ Well, it's OS/2 Pipelines, version 1.00.56, it now stops at '7F'x, before it showed the complete character set. Then, the text editor I use saves files now UTF-8 encoded. Seems...
Hello Erich! TY for investigating in this subject, also for ticket #1984, you found many more issues than I could ever see. In a different country your screenshot - I assume, from a 1252 "ANSI" codepage, the Windows default in your region - could very well look differently. Maybe I was not clear enough, the shown characterset is just xrange('20'x, 'FF'x), interspersed with .endofline every 16th character, sent to a multiline edit control created with ooDialog -- no codepage set from me. What the...
Trace problem when calling other program with I/O redirection
Enabling the Beta UTF-8 setting works for me (reboot required, remember, this is still Windows ...): https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page With this set, the actual OEM, ACP, CurrentCodepage and CurrentOutputCodepage are all 65001 = UTF-8 - exactly what's needed.. running call RxMessageBox 'I will display 😜', 'Sürprise' displays like attached PNG. This looks very nice to me. As always, your mileage may vary ...
When installing ooRexx on a PC, is the particular locale of that machine respected somehow? Locale typically means language - ooRexx doesn't care about that. Or would -- since ooDialog framework is compiled in ANSI only mode -- set text from '20'x to 'FF'x of an edit control look like the one attached? In a different country your screenshot - I assume, from a 1252 "ANSI" codepage, the Windows default in your region - could very well look differently. This is because in this other country Windows...
Unix fixes for rxapis issues [bugs:#1981] RXAPI Improper/?Missing Access Control and [bugs:#1982] and [bugs:#1983]
No labels should be allowed within DO/LOOP, IF, SELECT
additional fixes committed withrevision [r12915]
SysTo/FromUnicode issues
additional code fixes for [bugs:#1945] No labels should be allowed within DO/LOOP, IF, SELECT
When installing ooRexx on a PC, is the particular locale of that machine respected somehow? Or would -- since ooDialog framework is compiled in ANSI only mode -- set text from '20'x to 'FF'x of an edit control look like the one attached? Completely independent from whatsoever locale?
SysToUnicode seems to be very tolerant about the codepage specification, no matter what I set it indicates No errors. Or my laptop has installed cp "XXX" and "WTF16".
In section 9.23 useUnicode of ooDialog Reference I read Currently, the ooDialog framework is compiled in ANSI only mode. Is there a remote chance this "currently" ends in near future?
Hello Erich! TY for this (almost) working example (only one comma was missing within IF). Also TY for pointing me to the changed address (just "" what I use normaly on its own does not the trick it seems). You can't. Not every Windows codepage can display every glyph, Well, the well known flaw of codepages. But maybe I'm lucky since in my case it's only about four characters, .ne. what is mostly shown as = overtyped by / which I replace by #, the paragraph §, the up arrow which I replace by ^, and...
Hi René! You might have a look into what emacs does to mostly get this right. But Rony is right - even ooRexx cannot guess these things. I still strongly suggest to use Josep Maria's Unicode package instead of re-inventing the wheel. There are two more points to consider, i) when I publish a program I can not advice to install an unfinished supplement. Similar problem with ooRexx 5.oo which obviously is not updated although buggy, alas 5.1 is still beta. (A 5.0.1 would be nice me think.) ii) about...
Hello Rony! In general there are no BOMs for text files A quick look for determination of encoding unveiled, no known method is 100% correct. That is why I only take BOMs as tag, all else remains users' task. This "solution" is close to the approach suggested by P.O. Therefore one must know the encoding that was used when a text file was created in order to be able to correctly process it. Text editor's offer -- at least the one I use for programming -- with save as... besides the encoding also the...
is there a chance to capture the output of chcp? Yes. You could update the CP class with something like this: ::method activate class expose cpActive address "" "chcp" with output stem line. if rc = 0, line.0 = 1, line.1~words > 0, line.1~word(line.1~words)~dataType("whole") then cpActive = line.1~word(line.1~words) else cpActive = "ACP" ::method fromUTF8 class expose cpActive use strict arg string, cpOut = (cpActive) return self~convert(string, "UTF8", cpOut) What must I do to ensure the same look...
removing docbuild test from sandbox/po
aligning docs test with trunk for sandbox/po
You might have a look into what emacs does to mostly get this right. But Rony is right - even ooRexx cannot guess these things. I still strongly suggest to use Josep Maria's Unicode package instead of re-inventing the wheel. best regards, René. On 16 Sep 2024, at 12:56, Rony G. Flatscher orexx@users.sourceforge.net wrote: On 15.09.2024 18:17, m-stgt wrote: Your example is the crystal nucleus for my slightly automated approach -- because I found no way with ooRexx (also not -- René suggested it --...
On 15.09.2024 18:17, m-stgt wrote: Your example is the crystal nucleus for my slightly automated approach -- because I found no way with ooRexx (also not -- René suggested it -- within the Unicode package by Josep Maria Blasco) to determine the encoding of an input file, I look for a BOM and if there is none I assume it's ANSI (what is in fact P.O.'s way). A BOM ("byte order mark") is an optional indicator for Unicode files. In general there are no BOMs for text files, many times not even for Unicode...
TraceObject breaks existing code
House-cleaning Doc build tools
Buggfix to BuildandUploadDocs.rex; updating Readme.txt for release
Hello Erich! Your example is the crystal nucleus for my slightly automated approach -- because I found no way with ooRexx (also not -- René suggested it -- within the Unicode package by Josep Maria Blasco) to determine the encoding of an input file, I look for a BOM and if there is none I assume it's ANSI (what is in fact P.O.'s way). This subject leads to another question, what I do in ooRexx here on my PC looks exactly like I programmed it. But if somebody runs it on his Windows PC in Brazil, or...
On Sun, Sep 15, 2024 at 11:15 AM m-stgt m-stgt@users.sourceforge.net wrote: Hello Rick! You requested to use trace 'I' ~~~ 4 - say a.9.z >C> A.9.Z => "A.9.1"? >V> A.9.Z => "XYZ"? >>> "XYZ" XYZ -- as Z=1 say returns a.9.1 5 - say a.~remove(9.z) >V> A. => "A." >L> "9.Z" >A> "9.Z" >M> "REMOVE" => "The NIL object" >>> "The NIL object" The NIL object -- Z in 9.z is not substituted, but why? You are calling remove with one argument, the value of the token "9.z". This is a constant literal token, so it...
Hello Rick! You requested to use trace 'I' 4 *-* say a.9.z >C> A.9.Z => "A.9.1"? >V> A.9.Z => "XYZ"? >>> "XYZ" XYZ -- as Z=1 say returns a.9.1 5 *-* say a.~remove(9.z) >V> A. => "A." >L> "9.Z" >A> "9.Z" >M> "REMOVE" => "The NIL object" >>> "The NIL object" The NIL object -- Z in 9.z is not substituted, but why? 6 *-* say a.~remove(9,z) >V> A. => "A." >L> "9" >A> "9" >V> Z => "1" >A> "1" >M> "REMOVE" => "XYZ" >>> "XYZ" XYZ -- at first glance this is surprising... ... but a. may be regarded as an array...
I suggest you use Trace I to see what is actually going on. This is definitely not a bug. Notes below. On Sun, Sep 15, 2024 at 5:07 AM m-stgt m-stgt@users.sourceforge.net wrote: Before I open a ticket I ask if I'm wrong regarding following as a flaw of remove ~~~ a.9.1 = pqr z = 1 say a.9.z PQR say a.~remove(9.z) -- you are asking it to remove tail "9.Z". There is no substitution for Z in the symbol 9.z. The NIL object -- WOOT! say a.~remove('9.'z) This time you are actually requesting the removal...
Before I open a ticket I ask if I'm wrong regarding following as a flaw of remove a.9.1 = pqr z = 1 say a.9.z PQR say a.~remove(9.z) The NIL object -- WOOT! say a.~remove('9.'z) PQR -- Why? Honestly, I'm puzzled. Best, M.
Hello P.O.! I considered also to do the conversion w/o REXX, highly likely I would do so if it's just for me. But what I plan is a miniscule addition to my HP41 simulating "oeuvre", to convert program listings, provenance "wherever", to an executable phase. That is why I strive for a self-acting solution. /M.
Hello Erich! Thank you very much for this working example. Took a few seconds but now I see a bit clearer how to use SysToUnicode/SysFromUnicode. When I run chcp in a cmd window it shows "Aktive Codepage: 850." (what implies there exist inaktive codepages). Thus I had to change the first line of your example to say .CP~fromUTF8('C3A4'x, 850) to actually get an ä to the CRT. Then I found in the Internet a hint REG QUERY "HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage" | findstr /I "CP.*REG_SZ"...
I have done a lot of work with utf-8 text (statistics translation etc) and I have found it easier to convert any data to Ascii before I put ooRexx to work. On Mac you can use iconv for that. Example: https://superuser.com/questions/151981/converting-the-encoding-of-a-text-file-mac-os-x Converting the encoding of a text file (Mac OS X) superuser.com Hälsningar/Regards/Grüsse, P.O. Jonsson oorexx@jonases.se Am 14.09.2024 um 08:08 schrieb m-stgt m-stgt@users.sourceforge.net: ooRexx is inapt to deal...
My goal is to transliterate an UTF-8 file to plain ASCII Hi Mike, for anything outside of 7-bit ASCII you will need to know the codepage you want to convert to. On Windows cmd.exe you could run chcp to see what code page your terminal is set to. A typical Unix shell will probably already be UTF-8. If your Windows cmd window is 1252 (set as default "ACP" below) this code will convert UTF-8 to printable. say .CP~fromUTF8('C3A4'x) -- ä ::class CP ::method fromUTF8 class use strict arg string, cpOut...
Hello René! I asked for a little tessera and you point to the Alps ;) Thank you, that will give me a WE or two of climbing. Best, M.