-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from secretGeek/unicode-fix
Unicode fix
- Loading branch information
Showing
7 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Control what python to use | ||
_OK__PATH_TO_PYTHON=$(command -v python) # set python2 | ||
_OK__PATH_TO_PYTHON=$(command -v python3) # set python3 | ||
echo "Path to python: '$_OK__PATH_TO_PYTHON'" # check path | ||
$_OK__PATH_TO_PYTHON --version # check python version | ||
# Control encoding or not | ||
echo "Python IO Encoding: ${PYTHONIOENCODING:--=not-set=-}" | ||
export PYTHONIOENCODING="UTF-8" # only python3 will choke on non-UTF-8, when this is set | ||
unset PYTHONIOENCODING # nonetheless, python will treat everything as ASCII | ||
# Go to the test cases | ||
cd iso_latin_1 | ||
cd mac_os_roman | ||
cd utf_8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file is encoded with ISO-8859-1 (or Western ISO Latin 1) | ||
export PYTHONIOENCODING="latin_1" | ||
echo "A0-AF: ��������������� (including NO-BREAK SPACE and SOFT HYPHEN)" | ||
echo "B0-BF: ����������������" | ||
echo "C0-CF: ����������������" | ||
echo "D0-DF: ���������������� (look at that MULTIPLICATION SIGN)" | ||
echo "E0-EF: ����������������" | ||
echo "F0-FF: ���������������� (the DIVISION SIGN is placed in the middle)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# only one comment | ||
export PYTHONIOENCODING="mac_roman" | ||
echo 'H�, �r �s g��n b�l �p de TV!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# A full Unicode UTF-8 encoded .ok-file | ||
export PYTHONIOENCODING="UTF-8" | ||
echo "Hi ㋛, how is it going?" | ||
echo "Ⓘ ⓐ ⓜ ⓦ ⓔ ⓛ ⓛ , 🅣 🅗 🅐 🅽 🅚 🆈 🅾 🆄 ❕" |