Skip to content

Commit

Permalink
Document character set
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Sep 1, 2017
1 parent f3230a4 commit cbd7299
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 0 additions & 7 deletions docs/frequently-asked-questions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,6 @@ Better use ``for (uint i = 0; i < a.length...``

See `struct_and_for_loop_tester.sol <https://github.com/fivedogit/solidity-baby-steps/blob/master/contracts/65_struct_and_for_loop_tester.sol>`_.

What character set does Solidity use?
=====================================

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

What are some examples of basic string manipulation (``substring``, ``indexOf``, ``charAt``, etc)?
==================================================================================================

Expand Down
4 changes: 4 additions & 0 deletions docs/introduction-to-smart-contracts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ and overwrite your number, but the number will still be stored in the history
of the blockchain. Later, we will see how you can impose access restrictions
so that only you can alter the number.

.. note::
All identifiers (contract names, function names and variable names) are restricted to
the ASCII character set. It is possible to store UTF-8 encoded data in string variables.

.. index:: ! subcurrency

Subcurrency Example
Expand Down

0 comments on commit cbd7299

Please sign in to comment.