Skip to main content
Fresh automatically detects and handles various text encodings, ensuring you can work with files from different systems and locales.

How It Works

Fresh uses a dual-encoding system:
1

In-Memory: UTF-8

All text is stored in memory as UTF-8, providing full Unicode support and consistent editing experience
2

On-Disk: Original Encoding

Files are converted to UTF-8 when loaded and converted back to the original encoding when saved
3

Status Bar Indicator

The encoding shown in the status bar indicates the on-disk encoding
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:
  • UTF-8 (default)
  • UTF-16 LE (Little Endian)
  • UTF-16 BE (Big Endian)
  • BOM (Byte Order Mark) detection
  • Latin-1 (ISO-8859-1)
  • Windows-1252 (Western European)
  • Windows-1250 (Central European)
  • 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:
1

Open Command Palette

Press Ctrl+P
2

Search for Reload

Type “Reload with Encoding”
3

Select Encoding

Choose the correct encoding from the list

File Browser Encoding Toggle

When opening files via the file browser (Ctrl+O), you can control encoding detection:
1

Open File Browser

Press Ctrl+O to open the file browser
2

Toggle Encoding Detection

Press Alt+E to toggle “Detect Encoding”
3

Manual Selection

When disabled, you’ll be prompted to select an encoding manually before opening the file
Use manual encoding selection when you know the file’s encoding and want to avoid automatic detection errors.

Large File Confirmation

For large files (>10MB) with non-UTF-8 encodings, Fresh shows a confirmation prompt before loading.
Full re-conversion is required for large non-UTF-8 files, which may take some time. Fresh will warn you before proceeding.

Common Encoding Scenarios

Try reloading with GBK or GB18030 encoding:
  1. Press Ctrl+P
  2. Type “Reload with Encoding”
  3. Select GBK or GB18030
Try reloading with Shift-JIS encoding:
  1. Press Ctrl+P
  2. Type “Reload with Encoding”
  3. Select Shift-JIS
Try Windows-1252 for Western European text or Windows-1250 for Central European text
  1. Click the encoding indicator in the status bar
  2. Select the target encoding
  3. Save the file (Ctrl+S)
The file will be saved in the new encoding

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

Build docs developers (and LLMs) love