Agents and features

File encoding

How Hull detects and preserves text encodings when it reads and edits your files.

Hull detects the encoding of each file it reads and writes changes back in the same encoding. You can work on files saved in legacy or non-UTF-8 encodings without Hull corrupting them or showing the model garbled text.

Supported encodings

  • UTF-8, with or without a byte order mark (BOM)
  • UTF-16 LE and BE, with a BOM
  • UTF-32 LE and BE, with a BOM
  • Shift_JIS, EUC-JP, GB2312, Big5 and EUC-KR
  • Windows-1251 and KOI8-R
  • The ISO-8859 family
  • Other common legacy Latin and CJK encodings

New files that Hull creates are always UTF-8 without a BOM. Detection only runs when Hull reads or overwrites an existing file.

Not supported

UTF-16 or UTF-32 without a BOM can't be told apart reliably from other encodings. Save the file with a BOM, or convert it to UTF-8.

Detection is statistical. Very short files, or files whose bytes happen to look like another encoding, can occasionally be misidentified. Converting the file to UTF-8 is the most reliable fix.

Report a problem

If Hull shows a file as garbled text or writes it back in a different encoding, email support@withhull.com with:

  • The file itself, attached. Don't paste its contents, because copying re-encodes the text.

  • The encoding it's saved in, for example Shift_JIS, windows-1251 or UTF-16 LE with BOM.

  • A SHA-256 hash of the file, so we can check it arrived intact:

    # macOS or Linux
    shasum -a 256 path/to/file
    # Windows
    Get-FileHash path\to\file -Algorithm SHA256
  • The model and provider you were using.

  • Your Hull version. In the CLI, run hull --version. In VS Code, check the version of Hull Code in the Extensions view.

On this page