Set Eclipse’s workspace text-file encoding to UTF-8 at Window > Preferences > General > Workspace. If the setting does not affect JSP files, check the JSP-specific structured-editor preference, resource-level encoding overrides, and the encoding declared in the JSP itself. These controls have different scopes; changing a default does not convert existing file contents.
Set the Eclipse workspace encoding to UTF-8
- Open Window > Preferences > General > Workspace. On macOS, the Preferences command may appear under the application menu rather than Window.
- Find Text file encoding, select Other, and choose or enter UTF-8.
- Apply the change. Eclipse describes this workspace preference as the encoding used when saving text files in editors. Eclipse Platform User Guide: Workspace
Check the JSP-specific editor preference
If general text files use UTF-8 but JSP files behave differently, open Window > Preferences > Web and XML > JSP Files and inspect the character-encoding setting. The exact labels or available choices can vary with the Eclipse version and installed Web Tools Platform (WTP) components. The structured-text editor guide identifies JSP Files as a location for character-encoding preferences. Setting preferences for structured text editors
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Competitive Programming 4 - Book 1: The Lower Bound of Programming Contests in the 2020s | $20.79 | Buy on Amazon |
| 2 |
|
Eclipse Cookbook: Task-Oriented Solutions to Over 175 Common Problems | $21.93 | Buy on Amazon |
| 3 |
|
Eclipse | $25.95 | Buy on Amazon |
| 4 |
|
The C Programming Language | $42.74 | Buy on Amazon |
| 5 |
|
Eclipse IDE Pocket Guide: Using the Full-Featured IDE | $9.71 | Buy on Amazon |
Make the JSP source encoding explicit
Eclipse recommends specifying an encoding in XML, (X)HTML, and JSP source because editors may look for it in the file. For JSP, the page directive can include pageEncoding and contentType, for example:
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
This is an illustrative pattern, not a tested snippet. Preserve any existing attributes, such as a language declaration, when adapting the directive. The directive’s declarations do not by themselves establish how every server is configured or guarantee the browser’s interpretation of a response. Eclipse structured-text editor help: File Encoding
#1 Best Overall
Understand which encoding control applies
| Control | Scope | When to inspect it |
|---|---|---|
| Workspace text-file encoding | General workbench default for text-file saves | First setting to check for the default applied to text files. Eclipse Platform User Guide |
| JSP Files preference | JSP structured editor or file type | When the difference appears limited to JSP files. Structured-text editor preferences |
| Project, folder, or file encoding | A resource or subtree; resources can inherit from containers | When only a specific project, folder, or JSP behaves differently. Eclipse Platform plug-in developer guide: File encoding and content types |
| JSP page directive | Encoding declared in the JSP source | When making the source declaration explicit or diagnosing JSP processing and response declarations. Eclipse structured-text editor help: File Encoding |
Resolve cases where UTF-8 does not seem to apply
New text files still do not save as UTF-8
- Recheck General > Workspace and confirm Text file encoding is set to Other: UTF-8.
- Inspect any editor- or file-type-specific encoding preference that could affect the file.
Only JSP files differ
Inspect Web and XML > JSP Files and note whether the page offers a JSP-specific setting or a workbench-default option. Preference availability and wording depend on the installed Eclipse components.
Only one project or file differs
Inspect the resource’s properties and determine whether its encoding is inherited from its project or folder, or explicitly set on that resource. Eclipse supports resource-level character-set settings, so one JSP can differ from neighboring files. Eclipse Platform plug-in developer guide: File encoding and content types
Rank #2
- Used Book in Good Condition
The source looks correct but the browser output does not
Check the JSP page directive and the server’s response behavior as separate parts of the problem. Eclipse documents the directive attributes, but its preference documentation does not establish how a particular server is configured.
Characters are already corrupted
Changing an encoding default does not demonstrate that existing bytes have been converted or repaired. Keep a copy of the file before attempting any explicit conversion or resaving, then verify the displayed characters and the saved encoding.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

