Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ad80c6bb
Kaydet (Commit)
ad80c6bb
authored
Mar 08, 2005
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Build with --disable-unicode again. Fixes #1158607.
üst
6349e895
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
7 deletions
+34
-7
codecs.py
Lib/codecs.py
+13
-5
test_support.py
Lib/test/test_support.py
+1
-1
NEWS
Misc/NEWS
+2
-0
_codecsmodule.c
Modules/_codecsmodule.c
+14
-0
_tkinter.c
Modules/_tkinter.c
+3
-1
setup.py
setup.py
+1
-0
No files found.
Lib/codecs.py
Dosyayı görüntüle @
ad80c6bb
...
@@ -720,11 +720,19 @@ def make_encoding_map(decoding_map):
...
@@ -720,11 +720,19 @@ def make_encoding_map(decoding_map):
### error handlers
### error handlers
strict_errors
=
lookup_error
(
"strict"
)
try
:
ignore_errors
=
lookup_error
(
"ignore"
)
strict_errors
=
lookup_error
(
"strict"
)
replace_errors
=
lookup_error
(
"replace"
)
ignore_errors
=
lookup_error
(
"ignore"
)
xmlcharrefreplace_errors
=
lookup_error
(
"xmlcharrefreplace"
)
replace_errors
=
lookup_error
(
"replace"
)
backslashreplace_errors
=
lookup_error
(
"backslashreplace"
)
xmlcharrefreplace_errors
=
lookup_error
(
"xmlcharrefreplace"
)
backslashreplace_errors
=
lookup_error
(
"backslashreplace"
)
except
LookupError
:
# In --disable-unicode builds, these error handler are missing
strict_errors
=
None
ignore_errors
=
None
replace_errors
=
None
xmlcharrefreplace_errors
=
None
backslashreplace_errors
=
None
# Tell modulefinder that using codecs probably needs the encodings
# Tell modulefinder that using codecs probably needs the encodings
# package
# package
...
...
Lib/test/test_support.py
Dosyayı görüntüle @
ad80c6bb
...
@@ -144,7 +144,7 @@ else:
...
@@ -144,7 +144,7 @@ else:
TESTFN_UNICODE_UNENCODEABLE
=
None
TESTFN_UNICODE_UNENCODEABLE
=
None
else
:
else
:
# Japanese characters (I think - from bug 846133)
# Japanese characters (I think - from bug 846133)
TESTFN_UNICODE_UNENCODEABLE
=
u"@test-
\u5171\u6709\u3055\u308c\u308b
"
TESTFN_UNICODE_UNENCODEABLE
=
eval
(
'u"@test-
\u5171\u6709\u3055\u308c\u308b
"'
)
try
:
try
:
# XXX - Note - should be using TESTFN_ENCODING here - but for
# XXX - Note - should be using TESTFN_ENCODING here - but for
# Windows, "mbcs" currently always operates as if in
# Windows, "mbcs" currently always operates as if in
...
...
Misc/NEWS
Dosyayı görüntüle @
ad80c6bb
...
@@ -96,6 +96,8 @@ Library
...
@@ -96,6 +96,8 @@ Library
Build
Build
-----
-----
-
Bug
#
1158607
:
Build
with
--
disable
-
unicode
again
.
-
term
.
h
is
now
properly
detected
again
.
-
term
.
h
is
now
properly
detected
again
.
-
Check
for
tzset
no
longer
dependent
on
tm
->
tm_zone
to
exist
in
the
struct
-
Check
for
tzset
no
longer
dependent
on
tm
->
tm_zone
to
exist
in
the
struct
...
...
Modules/_codecsmodule.c
Dosyayı görüntüle @
ad80c6bb
...
@@ -104,8 +104,15 @@ codec_encode(PyObject *self, PyObject *args)
...
@@ -104,8 +104,15 @@ codec_encode(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"O|ss:encode"
,
&
v
,
&
encoding
,
&
errors
))
if
(
!
PyArg_ParseTuple
(
args
,
"O|ss:encode"
,
&
v
,
&
encoding
,
&
errors
))
return
NULL
;
return
NULL
;
#ifdef Py_USING_UNICODE
if
(
encoding
==
NULL
)
if
(
encoding
==
NULL
)
encoding
=
PyUnicode_GetDefaultEncoding
();
encoding
=
PyUnicode_GetDefaultEncoding
();
#else
if
(
encoding
==
NULL
)
{
PyErr_SetString
(
PyExc_ValueError
,
"no encoding specified"
);
return
NULL
;
}
#endif
/* Encode via the codec registry */
/* Encode via the codec registry */
v
=
PyCodec_Encode
(
v
,
encoding
,
errors
);
v
=
PyCodec_Encode
(
v
,
encoding
,
errors
);
...
@@ -137,8 +144,15 @@ codec_decode(PyObject *self, PyObject *args)
...
@@ -137,8 +144,15 @@ codec_decode(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"O|ss:decode"
,
&
v
,
&
encoding
,
&
errors
))
if
(
!
PyArg_ParseTuple
(
args
,
"O|ss:decode"
,
&
v
,
&
encoding
,
&
errors
))
return
NULL
;
return
NULL
;
#ifdef Py_USING_UNICODE
if
(
encoding
==
NULL
)
if
(
encoding
==
NULL
)
encoding
=
PyUnicode_GetDefaultEncoding
();
encoding
=
PyUnicode_GetDefaultEncoding
();
#else
if
(
encoding
==
NULL
)
{
PyErr_SetString
(
PyExc_ValueError
,
"no encoding specified"
);
return
NULL
;
}
#endif
/* Decode via the codec registry */
/* Decode via the codec registry */
v
=
PyCodec_Decode
(
v
,
encoding
,
errors
);
v
=
PyCodec_Decode
(
v
,
encoding
,
errors
);
...
...
Modules/_tkinter.c
Dosyayı görüntüle @
ad80c6bb
...
@@ -838,8 +838,10 @@ static PyGetSetDef PyTclObject_getsetlist[] = {
...
@@ -838,8 +838,10 @@ static PyGetSetDef PyTclObject_getsetlist[] = {
};
};
static
PyMethodDef
PyTclObject_methods
[]
=
{
static
PyMethodDef
PyTclObject_methods
[]
=
{
#ifdef Py_USING_UNICODE
{
"__unicode__"
,
(
PyCFunction
)
PyTclObject_unicode
,
METH_NOARGS
,
{
"__unicode__"
,
(
PyCFunction
)
PyTclObject_unicode
,
METH_NOARGS
,
PyTclObject_unicode__doc__
},
PyTclObject_unicode__doc__
},
#endif
{
0
}
{
0
}
};
};
...
@@ -991,7 +993,7 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
...
@@ -991,7 +993,7 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
}
}
}
}
#else
#else
res
=
PyString_FromStringAndSize
(
value
->
bytes
,
value
->
length
);
res
ult
=
PyString_FromStringAndSize
(
value
->
bytes
,
value
->
length
);
#endif
#endif
return
result
;
return
result
;
}
}
...
...
setup.py
Dosyayı görüntüle @
ad80c6bb
...
@@ -770,6 +770,7 @@ class PyBuildExt(build_ext):
...
@@ -770,6 +770,7 @@ class PyBuildExt(build_ext):
))
))
# Hye-Shik Chang's CJKCodecs modules.
# Hye-Shik Chang's CJKCodecs modules.
if
have_unicode
:
exts
.
append
(
Extension
(
'_multibytecodec'
,
exts
.
append
(
Extension
(
'_multibytecodec'
,
[
'cjkcodecs/multibytecodec.c'
]))
[
'cjkcodecs/multibytecodec.c'
]))
for
loc
in
(
'kr'
,
'jp'
,
'cn'
,
'tw'
,
'hk'
,
'iso2022'
):
for
loc
in
(
'kr'
,
'jp'
,
'cn'
,
'tw'
,
'hk'
,
'iso2022'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment