Can a character run a few runes in Go?

I read it on this blog.

Even when using rune fragments, a single character can span multiple runes, which can happen if you have characters with a serious accent, for example. This complex and ambiguous nature of "characters" is the reason that Go strings are represented as sequences of bytes.

It's true? (this looks like a blog from someone who knows Go). I tested my car, and è 1 rune and 2 bytes. And the Go doc seems to say otherwise.

Have you had such characters? (utf-8) Can a character span multiple runes in Go?

+1
source share
1 answer

, :

s := "é́́"
fmt.Println(s, []rune(s))

( Go Playground):

é́́ [101 769 769 769]

, 4 . ...

Go: Go.

?

, . , "e" "◌" ( "\ u0301" ) "é" ( "e\u0301" NFD). - . . , , , , , , , .. , ( ). .

( ):

, , . , , , . - "" ? : 'e ́́́'. 4- .

.: .

: " " "?"

: . A rune . , . , 1 1 rune. rune , - . Unicode.

+2

All Articles