# How to iterate over unicode characters with multiple codepoints

**URL:** <https://discourse.julialang.org/t/how-to-iterate-over-unicode-characters-with-multiple-codepoints/47828>\
**Category:** New to Julia\
**Created:** [October 6, 2020, 3:13am UTC](https://discourse.julialang.org/t/how-to-iterate-over-unicode-characters-with-multiple-codepoints/47828 "2020-10-06T03:13:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![yha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yha/32/3502_2.png) [@yha](https://discourse.julialang.org/u/yha)\
**Post date:** [October 6, 2020, 1:28pm UTC](https://discourse.julialang.org/t/how-to-iterate-over-unicode-characters-with-multiple-codepoints/47828/5 "2020-10-06T13:28:06Z")

</div>

You can use `Unicode.graphemes` to iterate over graphemes (“user-perceived characters” in unicode), regardless of how they are encoded in code points:

```julia
julia> using Unicode

julia> graphemes("Héllo World")
length-11 GraphemeIterator{String} for "Héllo World"

julia> graphemes("Héllo World") |> collect
11-element Array{SubString{String},1}:
 "H"
 "é"
 "l"
 "l"
 "o"
 " "
 "W"
 "o"
 "r"
 "l"
 "d"

```

Note that the second element of this array is a string of 2 code points (“2 characters” in the terminology of Julia docs)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-iterate-over-unicode-characters-with-multiple-codepoints/47828)._
