Can't display special characters (umlauts) - progress-4gl

My startup parameters of progress are
-cpstream ibm850
-cpinternal 1252
When I execute MESSAGE rÖÄÜ., I get the result
r
Why the umlauts are not being displayed?
I'm using OpenEdge 10.2B with Archtitect.
Edit: If I run this program with the Progress Procedure Editor I get the umlauts displayed. I think I have misconfigured something, but I can't figure out what.

In the "Run configurations" you can also set startup parameters. The error lied there.

Related

Powershell commands?

Ok I'm having trouble and google isn't helping, so I thought I'd come to you geniuses. I'm using Powershell and posh-git, and it keeps doing something that I'm sure I can exit out of with a magic command, I just don't know it yet.
Basically, when I run git diff (or something else with a long result), it will only give me a screen's worth of information, and end the screen with a colon
:
And if I keep pressing Enter it will add more to the screen til it is done showing everything for that command, and shows
<END>
But now what? How do I get out of this and back to calling commands? Enter, Esc and the other things I thought to try are not helping. I'm sure this must be a simple thing, but I don't know how to explain to Google what I want.
Anyone know?
if you do a git config -l you may see some relevant entries like:
core.pager='less'
pager.diff=false
pager.log=true
You can enable or disable the pager for different commands, or set a different pager. https://www.kernel.org/pub/software/scm/git/docs/git-config.html has the details, check out the core.pager section and pager.<cmd> sections for specifics.
If you're using 'less' as your pager, hit 'h' at that : prompt to get lots of details about what you can do there, and as pointed out by others, q, Q, or ZZ will get you back to the command line.
You can terminate the current command using CTRL+C. Is that what you're asking?

How to keep output window open in Eclipse's COBOL IDE?

I need to know how to keep a window open so I can see the output of the screen when I run the program. It flashes before I can see the program's output. Thanks.
program-id. Experiment as "Experiment".
environment division.
configuration section.
Source-Computer. IBM-PC.
Object-Computer. IBM-PC.
special-names.
console is crt.
data division.
working-storage section.
procedure division.
Experiment-Start.
Display "Hello World".
end program Experiment.
I think you are describing normal behaviour.
If the Operating System has to open a window to run a program, then the Operating System will close that window when the program ends.
If you open the window, to get a DOS-prompt, and run the program, you will get different behaviour.
A little trick for testing is to put DISPLAY/ACCEPT statement immediate before the program ends:
In the WORKING-STORAGE SECTION
01 some-rubbish PIC X.
In the PROCEDURE DIVISION.
DISLAY "The Program is ending. Press Enter to allow it to finish."
ACCEPT some-rubbish FROM CONSOLE
There may well be something available in Eclipse, as it is a common development requirement, but until you find that, this should get you going.

Appcmd command not working

appcmd set config /section:applicationPools /[name='xxx - yyy'].processModel.idleTimeout:0.00:00:00
When I run this command, instead of receiving a validation message or an error message, the command goes "idle".
It actually just display the caret and I can write text, or wathever... until I CTRL+Break the command.
I tried waiting for 10 minutes but nothing else ever happens.
It's really weird, the command seems correct :S
Do you know what I possibly could be doing wrong?
Apparently when there is a space in the application pool's name, you have to put the "modification parameters" in quote.
So the command should actually be like this:
appcmd set config /section:applicationPools "/[name='xxx - yyy'].processModel.idleTimeout:0.00:00:00"
It really gets me to wonder why the simple quotes aren't useful enough.

Oddball issue arising with use of TextWrangler to edit Python 2.7 script which tests multithreading and Queue modules

I'm writing a script in Python 2.7 exploring the use of the multithreading and Queue modules. the script just defines two functions, one of which will be started in a thread instance to fill a Queue, and a second one which will be started in a second thread instance to pull something off the Queue. However, I cannot even get this script to execute, as it chokes on one of the function definitions even before it executes. The code snippet with the problem is:
def listenThread(counter):
while queue.empty() != True:
try:
outcome = queue.get()
print outcome
counter -=1
print counter
except:
return 'queue.get() command loop failing.'
The error message I am getting is:
$ python threading-and-queue-test.py
File "threading-and-queue-test.py", line 34
except:
^
IndentationError: unindent does not match any outer indentation level
$
I've searched SO and checked the docs for correct formation of the try-except construct, and it seems OK. I had earlier versions of the code (without the try-except ) working, so I am getting suspicious about the text editor, TextWrangler v4.0.1.
Can anyone suggest a debug approach or code correction?
Thanks!
Red
As you have already suspected, it is most likely an indentation error. Your text editor is probably mixing the use of tabs and spaces. Replace all tabs with spaces (or vice versa though the standard in python is 4 spaces) and you should see the error disappear.
For those who find this question later like I did it's easy to fix TextWrangler's settings and stop this issue altogether; Go to "Preferences" -> "Editor Defaults" -> "Auto-expand tabs" then set tabs to 4 spaces. Restart TextWrangler for changes to take affect. For existing documents that continue giving you a problem read this.

Unicode output on Windows command line?

I wrote a small Java application which output includes Unicode characters. When I use Eclipse to run it—I see all the output as expected.
The people who are supposed to use the application will run it as a jar file. I thought they could use standard cmd window, but in this window the Unicode appear as Gibberish.
Is there a way to make "cmd window" recognize the Unicode chars and display them properly?
Or, is there any tool to easily run the jar file and get the correct output?
BTW - redirecting the output to a file works okay, but the program is interactive, so this will not be a good solution.
Edit: Thanks everybody for the suggestions.
It seems that the cmd fonts don't have the specific characters I need, and this is why changing the code page did not solve my problem.
I found a way to add more monospaced fonts to the console, but after I add them any change that I want to do regarding the fonts (even choosing one of the original fonts in a different size) - is ignored.
I think that I will simply try with another tool, which supports chhosing a differnt font more easily.
Reference: Java Unicode on Windows Command Line
Try chcp 1252 or chcp 65001 from the command line. With Lucida Console or other font support.
try CMD /c /U java your.jar
The problem is the font with which the windows console is displaying output. Unfortunately for you, this is a user setting.
I recommend you suggest that your users set their windows console font to Lucida Console. That font should be able to handle wide/unicode characters.
In C++/C just use this: system("chcp 65001");
Don't forget to change the console's font to Lucida Console
For any answers, check it first. This is a simple console program, which verifies that changing the font actually does not work.
using System;
namespace ConsoleApplication1
{
class Program
{
static void Main( string[] args )
{
Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.WriteLine( "日本語です" );
Console.Write( "Finished. Press a key. " );
Console.ReadLine();
return;
}
}
}
I will check to see if the answer is concretely "Cannot be done". Other avenues to check: use a different shell. i.e. Powershell? I'll see if that works.
However, you could do:
ConsoleApplication1.exe > output.txt
notepad.exe output.txt
Disclaimer: My example is C#, but the console application should still work as such.
And view the results like that, in the meanwhile.
UTF-16 on cmd.exe
Open/run cmd.exe
Click on the icon at the top-left corner
Select properties
Then "Font" bar
Select "Lucida Console" and OK.
Write Chcp 10000 at the prompt
Finally dir /b
Also from
Is there a Windows command shell that will display Unicode characters?
CHCP 65001
DIR > UTF8.TXT
TYPE UTF8.TXT