# Event ends up with incorrect casing of starting letter

**URL:** <https://qa.fmod.com/t/event-ends-up-with-incorrect-casing-of-starting-letter/18921>\
**Category:** Unity\
**Created:** [June 20, 2022, 3:41pm UTC](https://qa.fmod.com/t/event-ends-up-with-incorrect-casing-of-starting-letter/18921 "2022-06-20T15:41:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jverbeek](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jverbeek](https://qa.fmod.com/u/jverbeek)\
**Post date:** [June 20, 2022, 3:41pm UTC](https://qa.fmod.com/t/event-ends-up-with-incorrect-casing-of-starting-letter/18921/1 "2022-06-20T15:41:40Z")

</div>

Hey there, I have a funny bug to report which seems to be a one-in-a-million case!  
In my FMOD project, I got an event named `beep_single_v2` and a folder called `BulletHits/`.

When iterating over the events in Unity using `EventManager.Events`, I noticed though that for some reason, my `beep_single_v2` event is called `Beep_single_v2`, with a capital B, which it doesn’t have in FMOD. Rebuilding the project or renaming didn’t help, it always does the same thing.

I wanted to figure out why, so I opened the `Master.strings.bank` file in a hex editor and I think I found why this is happening:

![Screenshot_1](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/2/2c0c066f614ac3a64f9e32cde09c12a2a6e5ecb9.png)

You can see that the `B` is only present once, and then it’s missing from both my `beep_single_v2` event and the `BulletHits` folder. Is this some sort of compression method to store same consequetive letters only once? Because if it is, it seems to ignore letter casing, which might be the culprit for my issue.

It’s not super important for us, but still a funny thing I thought I’d report. Cheers!

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [June 21, 2022, 3:15am UTC](https://qa.fmod.com/t/event-ends-up-with-incorrect-casing-of-starting-letter/18921/2 "2022-06-21T03:15:59Z")

</div>

Indeed you are absolutely correct, the strings are stored in a case insensitive radix tree which can cause some odd capitalizations when reconstructing the strings back from the bank. This is done for efficiency reasons but does have that slight consequence.

---

<div class="post-metadata">

**Author:** ![jverbeek](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jverbeek](https://qa.fmod.com/u/jverbeek)\
**Post date:** [June 21, 2022, 6:05am UTC](https://qa.fmod.com/t/event-ends-up-with-incorrect-casing-of-starting-letter/18921/3 "2022-06-21T06:05:30Z")

</div>

I see, thanks - glad I was right with my assumption! It would be cool if this would be optional though, as we’re building editor tools and the wrong capitalization makes some problems currently.

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [June 21, 2022, 6:32am UTC](https://qa.fmod.com/t/event-ends-up-with-incorrect-casing-of-starting-letter/18921/4 "2022-06-21T06:32:33Z")

</div>

All the FMOD APIs that accept the paths should be case insensitive, so there should be no issues there. If you are creating hashes from the paths I’d recommend lowercasing them before hashing.

Unfortunately this behavior can not be changed without switching to a completely different internal data structure. In the original design we decided that the advantages of the radix tree structure, in terms of memory and performance wins, outweigh the disadvantage of imperfect case preservation, especially considering that path lookups are meant to be case-insensitive anyway.

---

<div class="post-metadata">

**Author:** ![jverbeek](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jverbeek](https://qa.fmod.com/u/jverbeek)\
**Post date:** [June 21, 2022, 7:39am UTC](https://qa.fmod.com/t/event-ends-up-with-incorrect-casing-of-starting-letter/18921/5 "2022-06-21T07:39:21Z")

</div>

Yea, as I mentioned, it’s not about accessing events but more a matter of displaying them in a list as we’re comparing them against an internal list to find discrepancies. But we’re doing that with a lowercased check now, so all good! Thanks for the insight 🙂
