package main

import (
	"fmt"
)

func main() {
	// UTF-8 encoded string
	str := "Hello, 世界"

	fmt.Println("String:", str)

	// Accessing runes (UTF-8 characters)
	for i, r := range str {
		fmt.Printf("Rune at position %d: %c\n", i, r)
	}

	// Accessing bytes (raw 8-bit values)
	for i := 0; i < len(str); i++ {
		fmt.Printf("Byte at position %d: %x\n", i, str[i])
	}
}
