This is my code:
When it founds the first special char: "à" it stops writing text.
I included those characters on my font... all the chars are there.
It's al_draw_text uncapable of writing those special chars or I'm doing something absolutely wrong?
In fact, the same thing happens to me with al_show_native_message_box, beeing the strings finished when some special character like á, é, í is found.
I have to change the language code for the whole program or something like that?
Make sure your strings are UTF-8 encoded for Allegro's text output.
However, the native dialogs don't support UTF-8 (on Windows), so you'll have to use ASCII for that.
And al_set_window_title() doesn't work with utf-8 neither...
None of the Window platform calls support UTF-8 strings. It could, but somebody would have to update Allegro to convert all 8-bit strings into 16-bit Window strings before calling the Win32 API.
But al_draw_text() will work fine if given UTF-8 strings, which is mainly what this thread is about.
Then the chars à,á,è,é,i,ï,ò,ó,ù,ú are not UTF-8?
Because with al_draw_text it finishes writing when it founds a char like those ones, important chars on my language btw!
Configure your IDE to save the document UTF-8 encoded. For example in C::B
{"name":"605530","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/e\/fe7e1946666de65c13a7c1b6af9c9693.png","w":847,"h":304,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/e\/fe7e1946666de65c13a7c1b6af9c9693"}
The problem is solved, thank you very much!
Then the chars à,á,è,é,i,ï,ò,ó,ù,ú are not UTF-8?
UTF-8 is just an encoding. Your editor was probably saving in regular "ASCII" mode. The first 127 characters are identical between UTF-8 and ASCII, which is why most of the letters were working fine. But as soon as something 128 or higher was found, it would have been an invalid UTF-8 encoding, triggering an error.