Hi, sorry for posting in this old topic but I needed to get this out of my chest. For some reason I had been having problems with "special" characters such as áéíóú♥. For some reason it showed diamonds with question marks (a.k.a. unknown characters), depending on how many bytes it comprised of, so for example á showed 2 and ♥ showed 3 of these unknown characters.
I did achieve to fix it on my game after some experimentation, trial, error, and reading some StackOverflow. The thing is that I found that, for some reason, strings read from the INI file, even if the INI file is UTF8 with no BOM, were formatted in ASCII 8-bit. Much more weird is the fact that printing them with a regular draw_text works just fine. But things like letter-by-letter messages, or anything that reads one character at a time, did show these as unknown characters.
So anyway, I fixed it by doing this. I modified the self.localize method, just by adding force_encoding.
#-----------------------------------------------------------------------------
# * Parses a string for localization codes and returns it
#-----------------------------------------------------------------------------
def self.localize(string)
if string != nil
return string.gsub(/\\[Ll][Aa][Nn][Gg]\[(.+)\]/) { a = self.read($1).force_encoding('UTF-8')}
end
end
Seems to work fine because the data it reads it's actually UTF-8, so it really doesn't need to reconvert, just remember it that it is a UTF-8 string, not ASCII! Same bytes, wrong way of reading.
I don't know if anyone else had this problem, but I just wanted to share, since it gave me some pain.