回答編集履歴
1
コードを訂正
test
CHANGED
@@ -34,11 +34,11 @@
|
|
34
34
|
|
35
35
|
c = ''.join(f' U+{ord(c):04x}' for c in s) # U+xxxx形式に変換
|
36
36
|
|
37
|
-
out = s.encode(sys.stdout.encoding)
|
37
|
+
# out = s.encode(sys.stdout.encoding) # LC_CTYPE=Cのとき例外が起きたので断念
|
38
38
|
|
39
39
|
print('in python str: ', c)
|
40
40
|
|
41
|
-
print('encoded for output: ', out)
|
41
|
+
# print('encoded for output: ', out) # LC_CTYPE=Cのとき例外が起きたので断念
|
42
42
|
|
43
43
|
print(data)
|
44
44
|
|