On Wednesday, 6 July 2016 17:31:06 UTC+3, gary.wi...@victoriaplumb.com 
wrote:
>
> I have a little snippet here which iterates over a string.
>
> package main
>
> import "fmt"
>
> func main() {
>
> text := "Noël"
>
> for _, rune_ := range text {
> fmt.Printf("%#U\n", rune_)
> }
> }
>
> Playground: https://play.golang.org/p/bVfXB2crKo
>
> The output is not correct because it breaks the 'e' from the diaeresis '
> *¨*'.
>
> Without normalisation (because it doesn't work with all code points), is 
> there any way of iterating over this string by grapheme to output each as a 
> fully formed readable character?
>

I'm not an expert in this area, but combing characters belong to mark 
category: https://play.golang.org/p/2X8xc9sijY

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to