Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork937
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
My code is , And there is no chinese in my repo path。 And an exception was found.
|
BetaWas this translation helpful?Give feedback.
All reactions
Strangely enough it looks like I have seen this before.
The problem seems to be that the python interpreter default code isgbk
, but should beutf-8
for most purposes. It can be changed on startup I think.
It looks likethis is how you change the default encoding.
Replies: 2 comments 8 replies
-
Strangely enough it looks like I have seen this before. The problem seems to be that the python interpreter default code is It looks likethis is how you change the default encoding. |
BetaWas this translation helpful?Give feedback.
All reactions
-
What about setting the IO encoding? |
BetaWas this translation helpful?Give feedback.
All reactions
-
I had tried other function. |
BetaWas this translation helpful?Give feedback.
All reactions
-
BetaWas this translation helpful?Give feedback.
All reactions
-
I tried repo.git.pull() and without any parameters,it was wroking. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Where is the 'gbk' codec coming from? Is it some other program code outside of GitPython that sets it? What are these values after executing the code running GitPython? |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Some further information: On Windows Python can be made to use UTF-8 instead of the ANSI active code page byrunning the interpreter with Python will also use UTF-8 when instructed to do so, by passing Unlike other systems where the most closely related locale settings are more readily changed and can be changed easily for specific commands using simple and well-documented techniques, the ANSI active code page on a Windows system is a system-level setting (unlike the interface language setting and preferred language settings), which can be changed, but only for the whole system, and this is rarely done.This post and its linked sources provide some more information about that. Windows can also bemade to use UTF-8 where it would otherwise use a localized code page, though this is considered "beta" and some applications might have problems. |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #1373 on November 05, 2021 06:51.