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.
More Posts related to Java,
- How to Get List of All Country Codes in Java Using Locale Class
- Unsupported major.minor version 52.0 in java
- Java - How to set custom thread name?
- Get the current timestamp in Java
- Java Spring Boot 3 Web Hello World with Gradle in IntelliJ
- [fix] NullPointerException Cannot Invoke findById because Repository is null - Java Spring
- java: unclosed string literal [Error]
- Convert Java Byte Array to String with code examples
- Error: Can not find the tag library descriptor for
- Java 8 - Convert List to Map Examples
- Java - Calculate time taken for the code to execute in milliseconds or nanoseconds
- Fix java.net.ProtocolException: Invalid HTTP method
- Java: Convert Stream to List
- Java equals method - Tutorial
- List of Java JDBC Database Driver Jars, Classes and URLs Details
- Read YAML file Java Jackson Library
- How to display Java Date Time timezone GMT/UTC offset using SimpleDateFormat
- List of Java Keywords
- Enable JSON Pretty Print in Java Jackson
- How to Word-Warp Console logs in IntelliJ
- Convert Map to List in Java 8 using Stream API
- Create a Directory using Java Code
- Ways to Convert Integer or int to Long in Java
- [Program] How to read three different values using Scanner in Java
- Java JDBC Example with Oracle Database Driver Connection
More Posts:
- How to add password to pdf file for opening, editing, printing, copying - HowTos
- Default speed of Marquee tag : SCROLLAMOUNT - Html
- Microsoft Office Mac Ventura: System Settings must be changed before Microsoft AutoUpdate can run - Microsoft
- [Notepad++] Remove CR Carriage Return and LF Line feed (CRLF) - NotepadPlusPlus
- Android : Unable to load VM from snapshot : Mac OS X Error - Android
- How to Organize Mac Desktop Files - MacOS
- [Fix] java.time.zone.ZoneRulesException: Unknown time-zone ID - Java
- Calculate Volume of Cylinder - C-Program