How It Works
Fresh uses a dual-encoding system:In-Memory: UTF-8
All text is stored in memory as UTF-8, providing full Unicode support and consistent editing experience
On-Disk: Original Encoding
Files are converted to UTF-8 when loaded and converted back to the original encoding when saved
Changing the status bar encoding changes how the file will be saved, not how it’s displayed in the editor.
Supported Encodings
Fresh supports a wide range of text encodings:Unicode Encodings
Unicode Encodings
- UTF-8 (default)
- UTF-16 LE (Little Endian)
- UTF-16 BE (Big Endian)
- BOM (Byte Order Mark) detection
Western Encodings
Western Encodings
- Latin-1 (ISO-8859-1)
- Windows-1252 (Western European)
- Windows-1250 (Central European)
Asian Encodings
Asian Encodings
- GBK (Simplified Chinese)
- GB18030 (Chinese)
- Shift-JIS (Japanese)
- EUC-KR (Korean)
Status Bar Indicator
The current encoding is shown in the status bar. Click it to change the encoding.View Current Encoding
Look at the right side of the status bar for the encoding indicator (e.g.,
UTF-8, GBK)Change Encoding
Click the encoding indicator to select a different encoding for saving
Reload with Different Encoding
If a file is detected incorrectly (showing garbled text), reload it with a specific encoding:- Command Palette
- Status Bar
File Browser Encoding Toggle
When opening files via the file browser (Ctrl+O), you can control encoding detection:
Large File Confirmation
For large files (>10MB) with non-UTF-8 encodings, Fresh shows a confirmation prompt before loading.Common Encoding Scenarios
Chinese Text Appears Garbled
Chinese Text Appears Garbled
Try reloading with GBK or GB18030 encoding:
- Press
Ctrl+P - Type “Reload with Encoding”
- Select GBK or GB18030
Japanese Text Shows Wrong Characters
Japanese Text Shows Wrong Characters
Try reloading with Shift-JIS encoding:
- Press
Ctrl+P - Type “Reload with Encoding”
- Select Shift-JIS
Legacy Windows Files
Legacy Windows Files
Try Windows-1252 for Western European text or Windows-1250 for Central European text
Saving in Different Encoding
Saving in Different Encoding
- Click the encoding indicator in the status bar
- Select the target encoding
- Save the file (
Ctrl+S)
Best Practices
Default to UTF-8
For new files, always use UTF-8 encoding for maximum compatibility
Verify After Reload
After reloading with a different encoding, verify the text looks correct before saving
Check Before Committing
Ensure encoding changes don’t break compatibility with other tools in your workflow
Document Encoding
For projects with specific encoding requirements, document the expected encoding