[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.



Recent Posts:




Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.