Skip to content

Commit 1634a79

Browse files
committed
Correct all UTF-8 spellings
1 parent 2a492f5 commit 1634a79

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/frequently-asked-questions.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ What character set does Solidity use?
399399
=====================================
400400

401401
Solidity is character set agnostic concerning strings in the source code, although
402-
utf-8 is recommended. Identifiers (variables, functions, ...) can only use
402+
UTF-8 is recommended. Identifiers (variables, functions, ...) can only use
403403
ASCII.
404404

405405
What are some examples of basic string manipulation (``substring``, ``indexOf``, ``charAt``, etc)?
@@ -741,15 +741,15 @@ see a 32-byte hex value, this is just ``"stringliteral"`` in hex.
741741
The type ``bytes`` is similar, only that it can change its length.
742742

743743
Finally, ``string`` is basically identical to ``bytes`` only that it is assumed
744-
to hold the utf-8 encoding of a real string. Since ``string`` stores the
745-
data in utf-8 encoding it is quite expensive to compute the number of
744+
to hold the UTF-8 encoding of a real string. Since ``string`` stores the
745+
data in UTF-8 encoding it is quite expensive to compute the number of
746746
characters in the string (the encoding of some characters takes more
747747
than a single byte). Because of that, ``string s; s.length`` is not yet
748748
supported and not even index access ``s[2]``. But if you want to access
749749
the low-level byte encoding of the string, you can use
750750
``bytes(s).length`` and ``bytes(s)[2]`` which will result in the number
751-
of bytes in the utf-8 encoding of the string (not the number of
752-
characters) and the second byte (not character) of the utf-8 encoded
751+
of bytes in the UTF-8 encoding of the string (not the number of
752+
characters) and the second byte (not character) of the UTF-8 encoded
753753
string, respectively.
754754

755755

docs/types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Dynamically-sized byte array
147147
``bytes``:
148148
Dynamically-sized byte array, see :ref:`arrays`. Not a value-type!
149149
``string``:
150-
Dynamically-sized UTF8-encoded string, see :ref:`arrays`. Not a value-type!
150+
Dynamically-sized UTF-8-encoded string, see :ref:`arrays`. Not a value-type!
151151

152152
As a rule of thumb, use ``bytes`` for arbitrary-length raw byte data and ``string``
153153
for arbitrary-length string (UTF-8) data. If you can limit the length to a certain

0 commit comments

Comments
 (0)