1
1
Using non-English characters
2
2
============================
3
- Expyriment has full `unicode support <http://docs.python.org/2 /howto/unicode.html >`_.
3
+ Expyriment has full `unicode support <http://docs.python.org/3 /howto/unicode.html >`_.
4
4
This means that, in principle, non-English characters (such as umlaut, accent,
5
5
special character) can be used in strings throughout the library. Two
6
6
different forms of using non-English characters have to be dissociated.
@@ -10,9 +10,8 @@ Non-English characters in strings in the Expyriment script file
10
10
When attempting to use non-English characters in strings in your Expyriment
11
11
script file, the following three conditions have to be met:
12
12
13
- 1. **Only use non-English characters in unicode strings (Python 2 only)! **
14
- For example: Use ``u"Überexperiment" `` instead of ``"Überexperiment" ``.
15
- (In Python 3 you can use normal strings, as they are already unicode compatible.)
13
+ 1. **Only use non-English characters in normal strings (and not byte string)! **
14
+ For example: Use ``"Überexperiment" `` instead of ``b"Überexperiment" ``.
16
15
17
16
2. **Know the encoding used by your editor! **
18
17
For example: IDLE will automatically suggest to save in utf-8 encoding when
@@ -24,7 +23,7 @@ script file, the following three conditions have to be met:
24
23
25
24
# -*- coding: utf-8 -*-
26
25
27
- (In Python 3, you can skip this, if and only if you use utf-8 encoding.)
26
+ (You can skip this, if and only if you use utf-8 encoding.)
28
27
29
28
Non-English characters in other text files (e.g. stimuli lists)
30
29
---------------------------------------------------------------
0 commit comments