Re: C/C++ plug-in: no linefeed in output window

2023-05-21 Thread Tim de Vries
if it's in the terminal, it's in your processing of out/err. If it's in 
your display, thats your paint/scroll.



tim

On 21/05/2023 8:04 a.m., Geert Vancompernolle wrote:


Just started today using the C/C++ plug-in.  Got it from NB8.2 since 
the plug-in has not been updated (yet?) for more recent NB's.


All is working fine except that the following commands:

     retval = wiringPiI2CWriteReg8(fd, 0x00, 0x80);
     printf("Writing IODIR_A = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x00));
     printf("Reading IODIR_A = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x00));
     retval = wiringPiI2CWriteReg8(fd, 0x01, 0x10);
     printf("Writing IODIR_B = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x01));
     printf("Reading IODIR_B = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x01));

result in the following representation on the output window:

Writing IODIR_A = [0x80].
  Reading IODIR_A = [0x80].
   Writing IODIR_B = [0x10].
    
Reading IODIR_B = [0x10].


As you can see, the "\n" character used in the printf() statement is 
not translated into "go to beginning of next line".  The next print 
statement simply goes to another line but starts where the previous 
line stopped.


To solve it, I have to add "\r\n" to the printf() statement. Only then 
the next line is also starting at position 1.


Any reason why "\n" is not doing both line feed and carriage return in 
the output window like it does in most other applications?


Font type used in the output window is Courier New.

--
Best rgds,
Geert

Integrating JavaDoc into Web Sites directly, Output Restructured Text or Markdown

2023-05-21 Thread Andreas Reichel
Greetings and compliments of the day.

I have revived and extended the
XMLDoclet: https://www.manticore-projects.com/XMLDoclet/index.html
Github Repo: https://github.com/manticore-projects/xml-doclet

It works with Java 11, 17 and 21 and writes JavaDoc to XML,
Restructured Text (*.rst) and Markdown (*.rst).
This way you can integrate your API Documentation directly into your
Web Site.

Example: 
https://www.manticore-projects.com/JSQLParser/javadoc_snapshot.html#binaryexpression

I plan to support also Docbook XML and Ascii Doctor and would like to
welcome all Contributors and Tester.
Please provide me with some testing and feedback.

Thank you and all the best
Andreas
 


C/C++ plug-in: no linefeed in output window

2023-05-21 Thread Geert Vancompernolle
Just started today using the C/C++ plug-in.  Got it from NB8.2 since the 
plug-in has not been updated (yet?) for more recent NB's.


All is working fine except that the following commands:

    retval = wiringPiI2CWriteReg8(fd, 0x00, 0x80);
    printf("Writing IODIR_A = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x00));
    printf("Reading IODIR_A = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x00));
    retval = wiringPiI2CWriteReg8(fd, 0x01, 0x10);
    printf("Writing IODIR_B = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x01));
    printf("Reading IODIR_B = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x01));

result in the following representation on the output window:

Writing IODIR_A = [0x80].
 Reading IODIR_A = [0x80].
  Writing IODIR_B = [0x10].
   
Reading IODIR_B = [0x10].


As you can see, the "\n" character used in the printf() statement is not 
translated into "go to beginning of next line".  The next print 
statement simply goes to another line but starts where the previous line 
stopped.


To solve it, I have to add "\r\n" to the printf() statement. Only then 
the next line is also starting at position 1.


Any reason why "\n" is not doing both line feed and carriage return in 
the output window like it does in most other applications?


Font type used in the output window is Courier New.

--
Best rgds,
Geert


Re: Console: ascii characters not shown correctly

2023-05-21 Thread Helmut Leininger

Hi,

I did not follow the whole thread, but I could solve similar problems 
with outputr to stderr / stdout in Netbeans by adding these options in 
the project configuration / Run / VM Options:


 -Dstdout.encoding=utf-8 -Dstderr.encoding=utf-8

Netbeans 17, Java 19

Regards

Am 21.05.2023 um 15:44 schrieb Geert Vancompernolle:

Sorry for my late reply, just back from a business trip.

I looked into the referenced pages you gave, applied the 
System.setOut() method with UTF-8 as parameter for the PrintStream() 
method like so:


System.setOut(new PrintStream(System.out, true, "UTF8"));

but it doesn't help.  The only change I see is that one strange 
character is replaced with another strange character.


A pity, because I like this ASCII "graphics".  I applied them already 
back in the '80 to make splash screens at that time (the extended 
ASCII character set was the only option back in those days to create 
some "graphish" intro screens and menus).


I went back to "+---+" and "|" characters to draw my box.


--
Mit freundlichen Grüßen
Helmut Leininger
Email: h.leinin...@gmx.at



OpenPGP_signature
Description: OpenPGP digital signature


Re: Console: ascii characters not shown correctly

2023-05-21 Thread Geert Vancompernolle

Sorry for my late reply, just back from a business trip.

I looked into the referenced pages you gave, applied the System.setOut() 
method with UTF-8 as parameter for the PrintStream() method like so:


System.setOut(new PrintStream(System.out, true, "UTF8"));

but it doesn't help.  The only change I see is that one strange 
character is replaced with another strange character.


A pity, because I like this ASCII "graphics".  I applied them already 
back in the '80 to make splash screens at that time (the extended ASCII 
character set was the only option back in those days to create some 
"graphish" intro screens and menus).


I went back to "+---+" and "|" characters to draw my box.

--
Best rgds,
Geert

On 03/05/2023 13:11, Neil C Smith wrote:

On Mon, 1 May 2023 at 16:47, Geert Vancompernolle
 wrote:

I have the following line in my Java application:

mLogger.info("╔╗");

but I see this in the debug console of NB17:

01-05-2023 17:43:22 INFO HomeControl -
╔��������������������������������������������������������������������������������╗

How can I get the correct ascii characters in NB17?  Previous versions
of NB (e.g. NB12.5) showed this correctly

If this has changed since NB 12.5, then it might be related to
https://github.com/apache/netbeans/issues/4771 and other linked
issues?

Best wishes,

Neil


-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists