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,
- Java equals method - Tutorial
- Unbound classpath container: JRE System Library [JavaSE-1.7]
- Spring Boot: @RequestBody not applicable to method
- Java 8: Steam map with Code Examples
- Java Program: Random Number Generator
- Java java.time.Clock class code examples [Java Date Time API]
- Fix: type argument is not within bounds of type-variable T
- [Fix] java.net.MalformedURLException: unknown protocol
- Java 7 addSuppression() and getSuppression() Exception Handling
- Convert Java Array to ArrayList Code Example
- How to Word-Warp Console logs in IntelliJ
- Ways Compare Dates in Java Programming with Examples
- Remove Trailing zeros BigDecimal Java
- CRUD operations in Spring Boot + JDBC
- [Java Threads] Should we extend Thread Class or implement Runnable interface
- Json Serialization and Deserialization using Java Jackson
- Create simple struts2 project using maven commands
- How to install Java OpenJDK 11 on Alpine Linux
- Unsupported major.minor version 52.0 in java
- Error: Can not find the tag library descriptor for
- Java: Convert String to Binary
- How to run Java Unit Test cases with Apache Maven?
- Java: Testing Private Methods in JUnit using reflection API Example
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting
- Java Join Strings with Comma Separator
More Posts:
- Ways to Convert Integer or int to Long in Java - Java
- StringJoiner Example with Java Collections - Java
- How to install Python 2.7.xx on macOS 12.3 Monterey or higher - Python
- Drop table using Java JDBC Template - Java
- Iterate over an Array using Java 8 Stream and foreach - Java
- Fahrenheit to Celsius Temperature Convertor: Tool & Formula - Tools
- How to update all installed packages at once in Ubuntu - Ubuntu
- How to install Android Studio Chipmunk and SDK tools on macOS (2021.2) - Android-Studio