Re: What is your favorite WC++IETJ?

Posted by ram a... on 04. May 2015

=?UTF-8?Q?JoshuaCranmer=f0=9f=90=a7?= writes:





{ for( auto c : "abc"s )::std::cout << c << '\n'; }
If I change "abc" to "?", I get
?
?
as output. So it does something which is completely wrong.





My newsreader does not display all UTF-8 symbols, but in C++
u8"abc" is an UTF-8 string literal. However, when outputting
such a beast, the output stream has to be imbued with the
correct locale which has to include the encoding necessary
in order to see the correct symbol. I have not yet tried
this, but it is possible that Java is simpler in this regard.



However, I live in Germany, where the people use strange
symbols, they call "Ümläütes" (or similar-sounding). In order
to print such a symbol on the Windows console with Java
one needs to do all of the following:




  • save the Java source file in an encoding that contains the
    "Ümläütes" and is known to you (in case of UTF, make sure
    the editor does not save a BOM)

  • hand over this encoding to the compiler using "-encoding"

  • set the encoding of the Windows console to a codepage CP
    that supports "Ümläütes"

  • now write to new a new java.io.FileOutputStream(
    java.io.FileDescriptor.out ), false, "CP" ), where »CP«
    is the encoding from the preceding step



    I have seen Windows environments where none of the
    precedings steps can be omitted!



30. Apr 2015: Re: What is your favorite WC++IETJ? by Eric ...

30. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by j4n b...

30. Apr 2015: If java doesn't support operator overloading, how does String + concatenation work by Ajay ...

29. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by Sebas...

29. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by Sebas...

29. Apr 2015: Re: Survey Request for Research related to Software Engineering and Social Media by Jerry...

29. Apr 2015: Survey Request for Research related to Software Engineering and Social Media by Augus...

29. Apr 2015: Re: Cannot seem to lock HashMap by pww19...

28. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by ram a...

28. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by Jan B...

27. Apr 2015: Re: Good example of EJB interface for CRUD operations by Rober...

27. Apr 2015: Easy exhaustive search with Java 8 Streams by Sebas...

27. Apr 2015: Re: Good example of EJB interface for CRUD operations by pavel...

27. Apr 2015: Good example of EJB interface for CRUD operations by pavel...

25. Apr 2015: Re: enum, what is it good for? by Rober...

24. Apr 2015: Re: enum, what is it good for? by Sebas...

24. Apr 2015: Re: enum, what is it good for? by Rober...

22. Apr 2015: Javascript advance by sheik...

22. Apr 2015: What is Armstrong number? Learn about Armstrong Number by sheik...

22. Apr 2015: Re: FileChooser on 2K Displays by j4n b...

22. Apr 2015: FileChooser on 2K Displays by j4n b...

22. Apr 2015: Re: how to hide and show cursor in JTextField? by Eric ...

22. Apr 2015: Re: how to hide and show cursor in JTextField? by karth...

21. Apr 2015: Re: enum, what is it good for? by Kevin...

21. Apr 2015: Re: runnable jar by Arne ...

21. Apr 2015: Re: C++ hash function -> Java by pww19...

21. Apr 2015: Re: Abuse of AssertionError? by Thoma...

21. Apr 2015: Re: Abuse of AssertionError? by j4n b...

21. Apr 2015: runnable jar by cebi ...

21. Apr 2015: Re: Abuse of AssertionError? by Jerry...

21. Apr 2015: Re: Abuse of AssertionError? by Eric ...

21. Apr 2015: Re: Abuse of AssertionError? by Eric ...

21. Apr 2015: Re: Abuse of AssertionError? by Jerry...

21. Apr 2015: Abuse of AssertionError? by Eric ...

21. Apr 2015: Re: enum, what is it good for? by Marce...

21. Apr 2015: Re: What could be improved about the assert statement by Eric ...

21. Apr 2015: What could be improved about the assert statement by ram a...

21. Apr 2015: Re: enum, what is it good for? by Tassi...

21. Apr 2015: enum, what is it good for? by ram a...

21. Apr 2015: Re: enum, what is it good for? by Leif ...

20. Apr 2015: Re: mouse listener on javafx swing node by Phili...

20. Apr 2015: Re: mouse listener on javafx swing node by Jeff ...

20. Apr 2015: FIGLIO DI PUTTANA NAZIRAZZISTA: PAOLO BARRAI DI CRIMINALI WMO E BSI ITALIA SRL VIA SOCRATE 26 MILANO (OLTRE CHE MEGALAVA CASH MAFIOSO O POLITI-CRIMINALE)! STALKA A MORTE CHI LO FOTOGRAFA E SE "1 INSISTE" IL KILLER PAOLO BARRAI FA "SUICIDARE" DAVVERO! by Memoc...

19. Apr 2015: Re: mouse listener on javafx swing node by Jeff ...

19. Apr 2015: mouse listener on javafx swing node by Phili...

18. Apr 2015: Re: How to extend FilterInputStream to convert tabs to spaces? by Arne ...

16. Apr 2015: Re: QMole Releases Java ECO System for iPhone and iPad by Jerry...

16. Apr 2015: QMole Releases Java ECO System for iPhone and iPad by Chris...

16. Apr 2015: QMole Releases Java ECO System for iPhone and iPad by Chris...

16. Apr 2015: QMole Releases Java ECO System for iPhone and iPad by Chris...

15. Apr 2015: Re: new JDK 1.8.0_45 by Wayne...

15. Apr 2015: Re: Calling Royal mail Mailmark web service from java by Arne ...

15. Apr 2015: Re: Java/J2EE Project by Arne ...

15. Apr 2015: Re: presentable Java features and programs by Jeff ...

15. Apr 2015: Re: presentable Java features and programs by Jeff ...

14. Apr 2015: What is this? (Java syntax) by ram a...

14. Apr 2015: new JDK 1.8.0_45 by Roedy...

14. Apr 2015: Re: What is this? (Java syntax) by Jeff ...

14. Apr 2015: Re: What is this? (Java syntax) by Jeff ...

14. Apr 2015: Re: What is this? (Java syntax) by Eric ...

14. Apr 2015: Re: What is this? (Java syntax) by Jeff ...

14. Apr 2015: New Requirment Hadoop Developer / Java Developer at Phoenix, AZ by Moin ...

14. Apr 2015: Fix my game? Help! by 12ich...

14. Apr 2015: Re: NotSerializableException by Eric ...

14. Apr 2015: Re: NotSerializableException by Rober...

14. Apr 2015: Java/J2EE Project by rahul...

13. Apr 2015: NotSerializableException by akksh...

13. Apr 2015: Calling Royal mail Mailmark web service from java by loial...

13. Apr 2015: Re: JDBC: scroll cursor "broken" after fetch absolute beyond end? by Marce...

12. Apr 2015: Re: JDBC: scroll cursor "broken" after fetch absolute beyond end? by Marti...

12. Apr 2015: Re: presentable Java features and programs by Arne ...

12. Apr 2015: Re: presentable Java features and programs by Arne ...

12. Apr 2015: Re: JDBC: scroll cursor "broken" after fetch absolute beyond end? by Andre...

12. Apr 2015: Re: JDBC: scroll cursor "broken" after fetch absolute beyond end? by Arne ...

12. Apr 2015: SCHIFOSO PUZZONE NEOPIDUISTA TIZIANO RENZI (WIKI, IL FATTO QUOTIDIANO, ECT) FA DA TRAMITE FRA NAZIMAFIOSO PEDOFILO STRAGISTA SILVIO BERLUSCONI, FASCIO-LESBICA MARINA BERLUSCONI E FIGLIO BERLUS-CO-RROTTISSIMO MATTEO RENZI PER FAR SI CHE BERLUSCONIA... by Memoc...

11. Apr 2015: Re: http://www.w3.org/TR/html5/obsolete.html#non-conforming-features by Arne ...

11. Apr 2015: http://www.w3.org/TR/html5/obsolete.html#non-conforming-features by Al he...

10. Apr 2015: Re: Return of the Applets? by Silvi...

10. Apr 2015: Re: JDBC: scroll cursor "broken" after fetch absolute beyond end? by Marce...

10. Apr 2015: Re: Return of the Applets? by ram a...

10. Apr 2015: Re: how to set LD_LIBRARY_PATH within the Java program? by Andre...

10. Apr 2015: JDBC: scroll cursor "broken" after fetch absolute beyond end? by Andre...

10. Apr 2015: Check out my Toc Java tool, ideal for DevOps! by morti...

09. Apr 2015: Re: how to set LD_LIBRARY_PATH within the Java program? by A Bol...

09. Apr 2015: Re: how to set LD_LIBRARY_PATH within the Java program? by Eric ...

09. Apr 2015: how to set LD_LIBRARY_PATH within the Java program? by John ...

09. Apr 2015: Разработчика систем видеоконференцсвязи. by Таня ...

08. Apr 2015: Re: Return of the Applets? by Kevin...

08. Apr 2015: Re: Return of the Applets? by Kevin...

08. Apr 2015: Re: presentable Java features and programs by Jeff ...

08. Apr 2015: Re: Any good book/website with samples how to run Java in web applications? by Rober...

08. Apr 2015: Re: Any good book/website with samples how to run Java in web applications? by Robbi...

08. Apr 2015: ASSASSINO FIGLIO DI PUTTANA: PAOLO BARRAI (28.06.1965)! DI CRIMINALISSIME WMO E BSI ITALIA SRL (OLTRE CHE MEGALAVA CASH MAFIOSO E/O POLITI-C-RIMINALE)! STALKA A MORTE CHI LO FOTOGRAFA E SE "UNO" INSISTE IL KILLER PAOLO BARRAI FA "SUICIDARE" DAVVERO!! by Memoc...

08. Apr 2015: Re: presentable Java features and programs by Gene ...

07. Apr 2015: Re: Return of the Applets? by Marti...

07. Apr 2015: Re: presentable Java features and programs by Jeff ...

07. Apr 2015: Re: Return of the Applets? by Marti...

07. Apr 2015: Re: Return of the Applets? by Marti...

07. Apr 2015: Re: Return of the Applets? by Silvi...

07. Apr 2015: Re: Return of the Applets? by Jerry...