Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #24 Assign to string the japanese word ネコ

Declare a new string s and initialize it with the literal value "ネコ" (which means "cat" in japanese)

s := "ネコ"

UTF-8 literals are valid in Go.

Also the source code in Go is defined to be UTF-8 text; No other representation is allowed.
const char * s = "ネコ";

C has no notion of character sets, output depends on locale settings and terminal capabilities.

New implementation...