[Java] Error: Unmappable character for encoding UTF-8. Save could not be completed.


Java Error: ⚠️ Unmappable character for encoding UTF-8
Save Problem: Save could not be completed. Try File > Save As... if the problem persists.
Reason:
Some characters cannot be mapped to ISO-8859-1 character encoding.
Either change the encoding or remove the characters which are not
supported by ISO-8859-1 character encoding.
package com.code2care.tutorials;

import java.util.regex.Pattern;

/**
 * 
 * @author Code2care Tutorials
 *
 *  � 2020
 *  
 */

If you are using Non-Latin English characters in your code (if you are Swedish or German example: Å Ä Ö) then you might see this error message if you have the file encoding which is not UTF-8. You either need to save this file as UTF-8 or remove such characters.

Solution:

If you are using eclipse, Go to Window -> Preferences -> Search Workspace -> Text Encoding => UTF-8

[Java] Error - Unmappable character for encoding UTF-8. Save could not be completed.
[Java] Error - Unmappable character for encoding UTF-8. Save could not be completed.


















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap