Skip to content

GPT Plugin Builder breaks UTF-8 in Gmail/Drive API usage #2354

Open
@MaxZhadobin

Description

@MaxZhadobin

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

We’re using GPT Plugin Builder to integrate with the Gmail and Google Drive APIs.

There’s a critical issue: raw MIME input for Gmail and text/plain for Drive do not preserve UTF-8 correctly. Cyrillic text in email Subject and Body, as well as in .txt/.md file content, is corrupted.

Builder does not:

Encode non-ASCII headers with =?UTF-8?B?...?=

Add Content-Type: charset=utf-8

Apply quoted-printable or base64 to the body

This makes sending emails or creating readable .txt files in non-English languages impossible without a custom proxy.

Please consider supporting:

MIME generation from semantic fields (to, subject, body)

Automatic UTF-8 encoding and transfer encoding

Proper subject formatting per RFC 2047

Without this, GPT Plugin Builder becomes unusable for multilingual or international teams.

To Reproduce

Вот блок "To Reproduce" для GitHub issue — в точном формате OpenAI:


  1. Create a plugin with OpenAPI schema using the Gmail API sendMessage endpoint.
  2. Pass a raw MIME body with Russian (Cyrillic) characters in Subject and Body, e.g.:
Subject: Тест
Body: Привет, мир
  1. Use the plugin inside GPT Plugin Builder to send the email.
  2. Check the received email.

Expected behavior

The email should display correctly with UTF-8 encoding:

  • Subject: Тест
  • Body: Привет, мир

Actual behavior

  • Subject is garbled (e.g. ТеÑ�Ñ�)
  • Body displays unreadable characters (mojibake)

Root cause

The raw MIME string is not processed with correct UTF-8 headers or transfer encoding. Builder sends raw bytes without:

  • Content-Type: charset=utf-8
  • Content-Transfer-Encoding: quoted-printable
  • Subject: =?UTF-8?B?...?=

Code snippets

OS

Web (GPT Plugin Builder UI), platform-independent

Python version

Not applicable (GPT Plugin Builder, no direct code execution)

Library version

OpenAI GPT Plugin Builder (May 2025 version) — no local SDK involved

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions