Null isTrue
Null isTrue

Reputation: 1926

Solidity - Invalid character in string

I'm working on a Solidity ERC20 Smart Contract that needs verbiage from latin based countries. I'm using Remix ETH online IDE

How Can I add special characters without the compiler yelling at me?

currently:

string public responsavel = "Estado de SÃO PAULO Coçar";

this errors as: ParserError: Invalid character in string.

Essentially it doesn't like ç and Ã, but I need those as well as future é, ô characters and such.

Thanks in advance

Upvotes: 1

Views: 2705

Answers (2)

Soufian
Soufian

Reputation: 161

You can use unicode : string responsavel = unicode"Estado de SÃO PAULO Coçar";

Upvotes: 0

Petr Hejda
Petr Hejda

Reputation: 43571

You can use the UTF-8 sequence

string public responsavel = "Estado de S\xC3\x83O PAULO Co\xC3\xA7ar";

Upvotes: 3

Related Questions