Minecraft – How to use colored fonts in .lang files

minecraft-java-edition

I am making a custom texture pack with a .lang file, it looks something like this snippet:

enchantment.damage.all=Slayness
enchantment.damage.undead=Smite
enchantment.untouching=Silk Touch
enchantment.durability=Unbreaking
enchantment.lootBonus=Looting
enchantment.lootBonusDigger=Fortune
enchantment.lootBonusFishing=Luck of the Sea
enchantment.level.1=1
enchantment.level.10=Hax.
enchantment.level.127=Really?

I've tried to make colorful names like Making

enchantment.damage.all=Slayness

So it is this:

enchantment.damage.all=§4Slayness

Which, long story short, doesn't work.

Then I tried the \u00A74 key (Server MOTD):

enchantment.damage.all=\u00A74Slayness

Question

Is there anyway to make one object name colored using .lang files in texture packs?

UPDATE: What happens when I try enchantment.damage.all=§R§4Slayness

test

Best Answer

The result in your image shows that the editor you're using is not encoding in UTF-8.

If you're using Window's Notepad, you will need to change the default encoding from ANSI to UTF-8 as you save the file.

Notepad save screen

If you're using Notepad++, you can change the encoding from the Encoding menu.

Notepad++ encoding menu