Skip to content

Instantly share code, notes, and snippets.

@chatch
chatch / LanguagesUTF8
Created August 25, 2016 07:51 — forked from anonymous/LanguagesUTF8
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=0.3.6&optimize=undefined&gist=
contract LanguagesUTF8 {
// these work ok:
bytes32 asciiStr = "only ascii chars";
bytes32 zhongWenStr = "北京";
bytes32 arabicStr = "العربية" ;
bytes32 unicodeStr = "\u5317\u4eac";
bytes32 khmerStr = "ភ្នំពេញ";
// this fails with: 'is not implicitly convertible to expected type bytes32.'