Skip to content

glm-4.7-flash sometimes inserts Chinese characters in generated C code in an English language Claude session #143

@znmeb

Description

@znmeb

System Info / 系統信息

nvidia-smi 
Fri Feb 13 19:36:53 2026       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 590.48.01              Driver Version: 590.48.01      CUDA Version: 13.1     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3090        Off |   00000000:01:00.0  On |                  N/A |
| 78%   80C    P2            345W /  350W |   23081MiB /  24576MiB |     92%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            6100      C   /usr/local/bin/ollama                 21768MiB |
+-----------------------------------------------------------------------------------------+

OS: Ubuntu 24.04 LTS, Python 3.12.

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

Toolchain and operating steps:

  1. Install ollama from official installer - version is 0.16.1
  2. Install claude code from official installer - version is 2.1.41
  3. At the command line, do ollama launch claude --config
  4. Select glm-4.7-flash as the model. Let the model download and let Claude Code start a session after the download happens. I don't know the version of the model but it was downloaded around 2026-02-13 04:00 UTC
  5. Start a code generation session. In my case I'm building some C code from scratch to implement a differential equation solver using C fixed point (q30 and q62) arithmetic.
  6. At some point Claude says it has found a typo that it needs to fix. The typo turned out to be Chinese characters in a numerical C code value.

Expected behavior / 期待表现

Code generated with only English characters. gcc can't compile the Chinese.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions