Hocon non utf-8 characters

Hello guys,

Is it possible to put non utf-8 characters (like é, à, đ or even の) in a hocon config file ?

If not, since I quite don’t get it, how to simply have these spooky characters in a config-like file and get them in a string to use them (sending them to a player for example) ?

I mean it in the most general way of course, so that I can also help other people having the same problem.

Those are already UTF-8.

UTF-8 has literally thousands of characters…

The problem you may encounter is that minecraft’s font doesn’t support all of UTF-8 (Although it does support a good amount).

If you want to put them in a java string, you can either copy them or use unicode escapes. (Java files, by specification are written in unicode anyway).

Default minecraft font
The Font_ascii.png

I thought there was a smiley face somewhere…

Never saw that.

Well I’m assuming its somewhere in here:

Minecraft has more unicode than I thought…

1 Like

Oh lol :joy: Didn’t know that. Somewhere there will be that smiley I think.
Edit: So many Asian “letters”.

1 Like

Tank you for your answers.

Then I must have been mistaken, and indeed it works…

Any good tutorial about encodings ? I always have trouble when dealing with that :sob:

You’ll have to be wary of any spacing symbols in Unicode like Em Space, non-breaking space, word joiners, zero-width non-spaces and spaces, etc. Any of it isn’t supported by Minecraft. Especially it’s sneaky if you use functions like MessageFormat - it will return nornally for en_US like: “1,000,000”, but it will be something like “1▯000▯000” for ru_RU due to MessageFormat inserting non-breaking space here.

Example of this: