# Chapter 9: Possible errata in Converting Indexes Between Encoding Views section

**URL:** <https://forums.kodeco.com/t/chapter-9-possible-errata-in-converting-indexes-between-encoding-views-section/189044>\
**Category:** Swift Apprentice: Fundamentals\
**Created:** [July 5, 2023, 11:41pm UTC](https://forums.kodeco.com/t/chapter-9-possible-errata-in-converting-indexes-between-encoding-views-section/189044 "2023-07-05T23:41:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodaguilera](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@rodaguilera](https://forums.kodeco.com/u/rodaguilera)\
**Post date:** [July 5, 2023, 11:41pm UTC](https://forums.kodeco.com/t/chapter-9-possible-errata-in-converting-indexes-between-encoding-views-section/189044/1 "2023-07-05T23:41:01Z")

</div>

The Xcode compiler advised unwrapping the optional ([arrowIndex!]) in the code below

**Converting Indexes Between Encoding Views**

As you saw earlier, you use indexes to access grapheme clusters in a string. For example, using the same string from above, you can do the following:

```auto
let arrowIndex = characters.firstIndex(of: "\u{21e8}")!
characters[arrowIndex] // ⇨

```

and the same in:

```auto
if let unicodeScalarsIndex = arrowIndex!.samePosition(in: characters.unicodeScalars) {

characters.unicodeScalars[unicodeScalarsIndex]

}

if let utf8Index = arrowIndex!.samePosition(in: characters.utf8) {

characters.utf8[utf8Index] // 226

}

if let utf16Index = arrowIndex!.samePosition(in: characters.utf16) {

characters.utf16[utf16Index] // 8680

}

```
