# Have you ever met warning C4828?

**URL:** <https://forums.unrealengine.com/t/have-you-ever-met-warning-c4828/401872>\
**Category:** C++\
**Tags:** warning, unreal-engine, CPP, question\
**Created:** [August 12, 2017, 10:02am UTC](https://forums.unrealengine.com/t/have-you-ever-met-warning-c4828/401872 "2017-08-12T10:02:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoCodeBugsFree](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NoCodeBugsFree](https://forums.unrealengine.com/u/NoCodeBugsFree)\
**Post date:** [August 12, 2017, 10:02am UTC](https://forums.unrealengine.com/t/have-you-ever-met-warning-c4828/401872/1 "2017-08-12T10:02:36Z")

</div>

warning C4828: The file contains a character starting at offset 0x308 that is illegal in the current source character set (codepage 65001).  
warning C4828: The file contains a character starting at offset 0x31b that is illegal in the current source character set (codepage 65001).  
warning C4828: The file contains a character starting at offset 0x6dd that is illegal in the current source character set (codepage 65001).

---

<div class="post-metadata">

**Author:** ![Amneri](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Amneri](https://forums.unrealengine.com/u/Amneri)\
**Post date:** [August 12, 2017, 10:41am UTC](https://forums.unrealengine.com/t/have-you-ever-met-warning-c4828/401872/2 "2017-08-12T10:41:35Z")

</div>

Remove all chararacters in your code as “áàâäãéèêëí,…” in comments too and your warning will vanish.

Or you can disable it with preprocessor by pasting this in your file causing troubles :

```
#pragma warning(disable:4828)
```

---

<div class="post-metadata">

**Author:** ![NoCodeBugsFree](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NoCodeBugsFree](https://forums.unrealengine.com/u/NoCodeBugsFree)\
**Post date:** [August 12, 2017, 11:20am UTC](https://forums.unrealengine.com/t/have-you-ever-met-warning-c4828/401872/3 "2017-08-12T11:20:25Z")

</div>

You’re quite right! Thank you very much! it was “illegal” characters in comments (copied from book).

---

<div class="post-metadata">

**Author:** ![darkgaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkgaze](https://forums.unrealengine.com/u/darkgaze)\
**Post date:** [January 24, 2018, 12:37pm UTC](https://forums.unrealengine.com/t/have-you-ever-met-warning-c4828/401872/4 "2018-01-24T12:37:45Z")

</div>

Check out my answer under accepted answer over here.  
There’s no need to remove those.

> **[Warning C4828](https://forums.unrealengine.com/questions/701635/warning-c4828.html)**
>
> After updating to 4.17.1 I get many of this warning like: The file contains a character starting at offset 0x308 that is illegal in the current source character set (codepage 65001). And all this warnings mention comment sections, as there often...

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [March 31, 2026, 8:30pm UTC](https://forums.unrealengine.com/t/have-you-ever-met-warning-c4828/401872/5 "2026-03-31T20:30:30Z")

</div>

To search for non-ASCII characters, use a regular expression in Visual Studio:

> [^\x00-\x7F]+

or

> [^\t\r\n\x20-\x7E]+

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/4/fb4003551c18a0db139f443f97fb4f591ce9d0fa.png)
