im using ChatColor.translateAlternateColorCodes to make it so ¬aTest would get changed to Test but instead it shows as ÂTest how to fix?
Techy4198 Are you using one of these? If so try the other way. String.replaceAll("¬", "§"); Or ChatColor.translateAlternateColorCodes("¬", String); But ya like amhokies said, why not use someother character
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets
I don't get it. ¬, § and that A character that internet explorer fails to paste, are all standard ascii characters (they only use one byte) so whats up? also xXSniperzzXx_SD umadbro? the first argument of ChatColor.translateAlternateColorCodes MUST be a character. it doesn't accept strings.
Change " to '. 'u mad bro'? Minecraft uses UTF-8 as far as I'm aware, and you're probably saving your Yaml files in ASCII.
1Rogue why would I change " to ' ? that would give me ChatColor.translateAlternateColorCodes('¬', String); ...which is what I tried originally. the yaml is saved in 'ANSI as UTF-8' as reported by Notepad++
Because ' is a char notation and " is a string notation. Considering it's a bunch of encoding shenanigans I would say just use a different character if you don't understand the necessary measures to prevent the issue on every user of your plugin.
I chose that character because it is the least-used character on standard qwerty keyboards, I wanted something other than &, and § can't be typed in minecraft. (I will be using commands eventually, to set text in a config file.) wait THATS IT! I can just make sure that it gets replaced when SETTING it in the config via command! so I type /acs add ¬aHello ¬bWorld¬c! and it would save it to the config as §aHello §bWorld§c! which shouldn't cause any problems when reading it from the config. if it does, then SCREW YOU MOJANG! minecraft needs something which automatically removes strange characters like that which are directly before a § character EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Why not just use "&"? If you use .translateAlternateColorCodes, then it will only replace the correct ones.
Techy4198 People are trying to help you here and you are pulling comments like umadbro, etc; people wont want to help you anymore if continue to be a 6 year old kid who thinks /r/im14andthisisfunny is actually funny to everyone else. Also, what 1Rogue would solve what you are trying to do. On a side note... Techy4198 Why are you using notepad to code plugins, an IDE would be much more helpful and actually give you helpful advice instead of Notepadd++ because you have already been fooled by it once. Now, let me repeat what 1Rogue said to do... Code:java String message = "Whatever you want";message = ChatColor.translateAlternativeColorCodes('&', message);message = ChatColor.TranslateAlternativeColorCodes('[FONT=Georgia]¬', message);[/FONT]
Goblom you tell me that people wont want to help me, well turns out that some don't even know how to understand the problem. I never mentioned that I was coding using notepad++. I am using eclipse. but I use notepad++ for config.yml, plugin.yml, stuff like that. also, why would I want to translate the & character AND the ¬ character?... on a final note, I already have an idea about how to fix it, so if ur gonna only read a third of the thread and then say i'm acting like a 6 year old, then I honestly don't know why I still bother with this forum.