Accents ~ not working in Javafx

Asked

Viewed 286 times

1

Hello,

I received software that uses Javafx, and it was in the development stage to be finalized. I’m testing it and I realized that Portuguese accents, like, ~ and `, are not recognized in Textfield. I have searched the official doc and in various forums, but I saw nothing that indicated how to solve the problem. Does anyone know how to solve this problem?

*Application details: does not use fxml.

private TextField nomeField;
nome = new Label("Nome:");
nomeField = new TextField();
nomeField.setPrefSize(620.0, 27.0);

HBox dados = new HBox(20);
dados.getChildren().addAll(nome, nomeField, cadastrar);
  • It looks like editor/IDE problems, not Javafx. I created a label to test and had no problems with encoding. You can create an example that can be reproduced?

  • @Renan also believes that it is not the IDE’s problem, I am using Ecplise, and I checked, it is configured correctly for UTF-8. The closest example I can give is the one I posted, but do you have something more specific in mind? Can you say that I try to unroll here.

  • I’ve also defined Locale.setDefault(Locale.forLanguageTag("en-BR")); in the main app, but it didn’t work.

1 answer

0

Good afternoon,

In the English Stack Overflow seem to have found a solution to this in the Eclipse IDE here, but I believe logic works on any IDE.

In case the solution was to go to the screen 'Window>Preferences>General>Workspace' and change the 'Text file encoding' to 'UTF-8'

  • Hello, I’m using Eclipse, in fact, but I’ve checked this possibility, it’s all configuring for UTF-8.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.