L
L
LikeKey2021-02-25 07:26:58
Java
LikeKey, 2021-02-25 07:26:58

How to solve encoding error when compiling java class?

I uploaded a java project on vds with ubuntu operating system, when I try to run the javac command, an error occurs:

spoiler
Bot.java:40: error: unmappable character for encoding ASCII                                                                           
                        if (message.getText().equals("????????????")){                                                                
                                                      ^                                                                               
Bot.java:40: error: unmappable character for encoding ASCII                                                                           
                        if (message.getText().equals("????????????")){                                                                
                                                       ^                                                                              
Bot.java:40: error: unmappable character for encoding ASCII                                                                           
                        if (message.getText().equals("????????????")){                                                                
                                                        ^                                                                             
Bot.java:40: error: unmappable character for encoding ASCII                                                                           
                        if (message.getText().equals("????????????")){                                                                
                                                         ^                                                                            
Bot.java:40: error: unmappable character for encoding ASCII                                                                           
                        if (message.getText().equals("????????????")){                                                                
                                                          ^                                                                           
..............................                                                           
Bot.java:41: error: unmappable character for encoding ASCII                                                                           
                            vk.messages().send(actor).message("????????????!").userId(message.getFromId()).randomId(random.nextInt(100
00)).execute();                                                                                                                       
                                                               ^                                                                      
Bot.java:41: error: unmappable character for encoding ASCII                                                                           
                            vk.messages().send(actor).message("????????????!").userId(message.getFromId()).randomId(random.nextInt(100
00)).execute();                                                                                                                       
                                                                ^                                                                     
Bot.java:41: error: unmappable character for encoding ASCII                                                                           
                            vk.messages().send(actor).message("????????????!").userId(message.getFromId()).randomId(random.nextInt(100
00)).execute();                                                                                                                       
                                                                 ^                                                                    
Bot.java:41: error: unmappable character for encoding ASCII                                                                           
                            vk.messages().send(actor).message("????????????!").userId(message.getFromId()).randomId(random.nextInt(100
00)).execute();                                                                                                                       
                                                                  ^                                                                   
Bot.java:41: error: unmappable character for encoding ASCII                                                                           
                            vk.messages().send(actor).message("????????????!").userId(message.getFromId()).randomId(random.nextInt(100
00)).execute();                                                                                                                       
                                                                   ^                                                                  
Bot.java:41: error: unmappable character for encoding ASCII                                                                           
                            vk.messages().send(actor).message("????????????!").userId(message.getFromId()).randomId(random.nextInt(100
00)).execute();                                                                                                                       
                                                                    ^                                                                 
Bot.java:41: error: unmappable character for encoding ASCII                                                                           
                            vk.messages().send(actor).message("????????????!").userId(message.getFromId()).randomId(random.nextInt(100
00)).execute();                                                                                                                       
                                                                     ^
Bot.java:41: error: unmappable character for encoding ASCII                                                                           
                            vk.messages().send(actor).message("????????????!").userId(message.getFromId()).randomId(random.nextInt(100
00)).execute();                                                                                                                       
                                                                      ^                                                               
...............


How to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-02-25
@LikeKey

Obviously, specify the encoding of the source code with the appropriate compiler key.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question