# Bug in Rust char function \`is\_alphabetic\`?

**URL:** <https://users.rust-lang.org/t/bug-in-rust-char-function-is-alphabetic/141103>\
**Category:** uncategorized\
**Created:** [July 6, 2026, 2:37am UTC](https://users.rust-lang.org/t/bug-in-rust-char-function-is-alphabetic/141103 "2026-07-06T02:37:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashutiw2k](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/ashutiw2k/32/53172_2.png) [@ashutiw2k](https://users.rust-lang.org/u/ashutiw2k)\
**Post date:** [July 6, 2026, 2:37am UTC](https://users.rust-lang.org/t/bug-in-rust-char-function-is-alphabetic/141103/1 "2026-07-06T02:37:29Z")

</div>

Hello,  
I am currently working on `primitive_types2` in the Rustlangs course, and when I tried to set an emoji as my character, the output reports that the emoji '🥲' is "Alphabetical!" as well as "Neither alphabetic nor numeric!" - I do not think this is correct.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/rust_lang/original/3X/7/f/7f5bbc9fd4103aed6d92b5deafac69283c4198c0.jpeg)

Also, the `is_alphabetic` function description states that emojis are not alphabetic, as shown here -

 ![image](https://us1.discourse-cdn.com/flex019/uploads/rust_lang/original/3X/f/9/f95270394eb5b96b8ed135f6b40e499aa5f30a49.png)  
So I am curious: is this a bug in Rust, or am I doing something incorrect?

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [July 6, 2026, 2:47am UTC](https://users.rust-lang.org/t/bug-in-rust-char-function-is-alphabetic/141103/2 "2026-07-06T02:47:43Z")

</div>

> [@ashutiw2k](#):
>
> the output reports that the emoji '🥲' is "Alphabetical!" as well as "Neither alphabetic nor numeric!"

that's simply not possible with an `if-else if-else` chain.

you are seeing the output of multiple tests probably.

please paste the code and output as text and format with code fences, screenshots can be hard to read for some users and devices.

---

<div class="post-metadata">

**Author:** ![ashutiw2k](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/ashutiw2k/32/53172_2.png) [@ashutiw2k](https://users.rust-lang.org/u/ashutiw2k)\
**Post date:** [July 6, 2026, 3:44am UTC](https://users.rust-lang.org/t/bug-in-rust-char-function-is-alphabetic/141103/3 "2026-07-06T03:44:50Z")

</div>

Thanks, yes I don't know how I missed the code block above...

Well that's a sign if any that I need to take a break!

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![akrauze](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/akrauze/32/39129_2.png) [@akrauze](https://users.rust-lang.org/u/akrauze)\
**Post date:** [July 6, 2026, 8:01am UTC](https://users.rust-lang.org/t/bug-in-rust-char-function-is-alphabetic/141103/4 "2026-07-06T08:01:08Z")

</div>

@ashutiw2k A note for the future. Please try to share code as text in markdown block, rather than pictures/screen shoots of it.

In order to share it you usually have to minimise it, which can often make you discover the bug on your own. And once code is in a text form it is much easier for others to help you, as we can simply copy and edit it.

And if you didn't know about it, you can also use [https://play.rust-lang.org](https://play.rust-lang.org). It has ability of sharing your code snippets as well.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [October 4, 2026, 8:01am UTC](https://users.rust-lang.org/t/bug-in-rust-char-function-is-alphabetic/141103/5 "2026-10-04T08:01:16Z")

</div>

Closed on October 4, 2026, 8:01am UTC

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
