Coder Social home page Coder Social logo

Comments (9)

quarkus-bot avatar quarkus-bot commented on July 18, 2024

/cc @dmlloyd (logging)

from quarkus.

geoand avatar geoand commented on July 18, 2024

I can't reproduce this with Greek characters

from quarkus.

Willian199 avatar Willian199 commented on July 18, 2024

Maybe it only happens with Latin characters.

Reproducer: https://github.com/Willian199/quarkus_log_chars

from quarkus.

geoand avatar geoand commented on July 18, 2024

That one works fine for me as well

from quarkus.

dmlloyd avatar dmlloyd commented on July 18, 2024

By "special" characters I assume you mean "non-ASCII" (aka Unicode code points whose value is greater than 127), which are only "special" outside of the USA (the "A" in "ASCII" stands for "American"). The problems you are having likely indicate that your system's default character encoding does not match what Java is expecting for whatever reason.

You did not indicate anything about your system environment (uname -a or ver along with java -version at least is needed) so that's all I can say for certain. You also did not indicate where you are seeing this issue: is it on the console, or in a file, or somewhere else?

What changed in Quarkus 3.6.5 is that the console charset is now detected more actively, and if no charset is given, we are falling back to the system default charset (which normally defaults to UTF-8 if all else fails). So I'm guessing that your problem is occurring on the console, in which case setting quarkus.log.file.encoding will do nothing, since that applies only to file logging. But, you should specify, otherwise I'm just guessing.

from quarkus.

Willian199 avatar Willian199 commented on July 18, 2024

I'm using Windows 11 22H2 and this happens in console. If I do System.out.println("àáéíóúç"); works as I expect

ver

Microsoft Windows [versão 10.0.22621.3007]

Java -version

java version "21" 2023-09-19
Java(TM) SE Runtime Environment Oracle GraalVM 21+35.1 (build 21+35-jvmci-23.1-b15)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)

from quarkus.

Willian199 avatar Willian199 commented on July 18, 2024

The Charset.defaultCharset() returns UTF-8.
But the StreamEncoder use IBM850.

Here is the last place where I found the correct value.
image

Here is wrong
image

from quarkus.

Willian199 avatar Willian199 commented on July 18, 2024

Well, following this tutorial solved the problem.

https://itsontreinamentos.com/2022/05/05/how-to-change-character-encoding-windows-11/

from quarkus.

dmlloyd avatar dmlloyd commented on July 18, 2024

To add more information: System.out does not use the console encoding, which is determined by java.io.Console separately (see Console.charset() for more information). The log manager uses this console encoding for console logging.

from quarkus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.