Skip to content
GPPL IDESOLIDCAM / INVENTORCAM

Search installation, settings, features and diagnostic codes.

Tab to a result · Enter to open · Esc to close
Install Community ↗

File encoding

GPPL postprocessors commonly use a Windows ANSI code page. Select the encoding required by the CAM installation that reads your files. The extension defaults to Windows-1252 and also supports Windows-1251 for Cyrillic content.

The hex-escape hover preview always interprets \xNN bytes as Windows-1252. This preview does not change the file encoding or its contents.

Two settings have different jobs:

  • files.encoding under [gppl] controls how VS Code reads and saves .gpp bytes.
  • gppl.encoding tells the language server which characters the target encoding can represent.

The extension synchronizes the GPPL file-encoding preference when gppl.encoding changes. If you have workspace overrides, check that the effective values agree. A Windows-1251 configuration looks like this:

{
"gppl.encoding": "windows1251",
"[gppl]": {
"files.encoding": "windows1251",
"files.autoGuessEncoding": false
}
}

Use windows1252 in both places for Windows-1252 files.

If a file opens with unreadable comments, use Change File Encoding → Reopen with Encoding from the encoding indicator in the status bar. Select the encoding in which the file was originally saved.

Reopening interprets the existing bytes differently. Save with Encoding writes new bytes and is appropriate when intentionally converting a correctly displayed file. Reopen with the correct encoding before saving text that currently looks corrupted.

GPPL3001 reports characters that cannot be represented in the selected target encoding. The diagnostic points to the first occurrence and summarizes the issue for the document. This can happen after pasting typography, symbols, or text from a different language.

Check whether the selected encoding is correct for the whole postprocessor. A quick fix may offer to switch the target encoding when the reported character fits the other supported code page. It changes the setting; verify the open document’s encoding before saving. Characters unsupported by both code pages need a representable replacement.

This section applies to the PRO closed beta for invited testers.

The encoding field in gppl.project.json controls how the background indexer reads unopened files in that project. It does not convert those files or replace VS Code’s encoding for an open editor. Keep all three consistent: project encoding, gppl.encoding, and the editor’s actual file encoding.