I have a hashmap containing a key and some values, such as:
final Map<String, String> map = new HashMap<>();
{
map.put("01", "Example – Description");
map.put("02", "Example – Description")
}
The value, description, in the hashmap contains a hyphen and when outputting to a CSV file it isn't being displayed correctly and instead shows 'x96'. I understand there is some encoding here that needs to be done - UTF-8?
My question is, how do you do this for a hashmap?
I am accessing these values in a method like this:
add[0] = updateSomething[0] + " " + map.get(e.getKey());