Fixes #4571: When not used for displaying localized text, specify Locale.ROOT for toLowerCase/toUpperCase to avoid issues with locale-specific non-ASCII lowercase conversions for ASCII uppercase characters (i.e. turkish lowercase i for uppercase I). (#4573)
This commit is contained in:
@@ -49,7 +49,7 @@ public class EnergyParticleData implements IParticleData {
|
||||
reader.expect(' ');
|
||||
boolean forItem = reader.readBoolean();
|
||||
reader.expect(' ');
|
||||
AEPartLocation direction = AEPartLocation.valueOf(reader.readString().toUpperCase());
|
||||
AEPartLocation direction = AEPartLocation.valueOf(reader.readString().toUpperCase(Locale.ROOT));
|
||||
return new EnergyParticleData(forItem, direction);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,8 @@ public class EnergyParticleData implements IParticleData {
|
||||
|
||||
@Override
|
||||
public String getParameters() {
|
||||
return String.format(Locale.ROOT, "%s %s", forItem ? "true" : "false", direction.name().toLowerCase());
|
||||
return String.format(Locale.ROOT, "%s %s", forItem ? "true" : "false",
|
||||
direction.name().toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user