枫之星雨 2021-10-06 13:21
浏览 220
已结题

git format-patch生成的patch文件Subject中文注释乱码

在ubuntu系统下, 使用git format-patch -1 commit_id生成的patch文件的中文是乱码
然后用file -ib 查看生成的patch文件:
text/x-diff; charset=unknow-8bit
问: 如何让生成的patch文件是
text/x-diff; charset=utf-8
现象如下:

zl@zl-VirtualBox:~/gittest$ cat 0001-1.patch 
From 71c84b2efcdbdf7f48ecc3b40371564498e06e2b Mon Sep 17 00:00:00 2001
Date: Wed, 6 Oct 2021 12:38:00 +0800
Subject: [PATCH] =?utf-8?q?1.=E6=B5=8B=E8=AF=95=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit


实际的中文注释是:1.测试测试

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 10月14日
    • 修改了问题 10月6日
    • 创建了问题 10月6日

    悬赏问题

    • ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
    • ¥15 安装quartus II18.1时弹出此error,怎么解决?
    • ¥15 keil官网下载psn序列号在哪
    • ¥15 想用adb命令做一个通话软件,播放录音
    • ¥30 Pytorch深度学习服务器跑不通问题解决?
    • ¥15 部分客户订单定位有误的问题
    • ¥15 如何在maya程序中利用python编写领子和褶裥的模型的方法
    • ¥15 Bug traq 数据包 大概什么价
    • ¥15 在anaconda上pytorch和paddle paddle下载报错
    • ¥25 自动填写QQ腾讯文档收集表