FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gitdb/gitdb/utils/encoding.py at master · gitpython-developers/gitdb · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Jul 26, 2026. It is now read-only.
gitpython-developers
/
gitdb
Public archive
Notifications
You must be signed in to change notification settings
Fork
68
Star
227
Code
Issues
6
Pull requests
0
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
gitdb
/
gitdb
/
utils
/
encoding.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (12 loc) · 372 Bytes
Breadcrumbs
gitdb
/
gitdb
/
utils
/
encoding.py
Copy path
File metadata and controls
18 lines (12 loc) · 372 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def
force_bytes
(
data
,
encoding
=
"utf-8"
):
if
isinstance
(
data
,
bytes
):
return
data
if
isinstance
(
data
,
str
):
return
data
.
encode
(
encoding
)
return
data
def
force_text
(
data
,
encoding
=
"utf-8"
):
if
isinstance
(
data
,
str
):
return
data
if
isinstance
(
data
,
bytes
):
return
data
.
decode
(
encoding
)
return
str
(
data
,
encoding
)
Back
|
FazBrowse Home
|
New Git URL