Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

jadou
10,776 PointsFormats won't match from other environments
com.teamtreehouse.challenges.homes.MainTest > argentinaRecordsAreFormattedAndConverted FAILED
Expected: "First is $1.00 (USD) which is $15,48 (Argentine Peso)" Actual: "First is $1.00 (USD) which is $�15,48 (Argentine Peso)"
1 Answer

jadou
10,776 PointsI am sure your soluation is correct. Please add this method as workarond created by Steven Branson
static String fakeFormatter(BigDecimal price) {
String pString = String.valueOf(price);
return String.format("$%s,%s",
pString.substring(0, pString.indexOf('.')),
pString.substring(pString.indexOf('.') + 1, pString.indexOf('.') + 3));
}
then edit this line below
String.format("%s (%s)", fakeFormatter(price), currentCurrency.getDisplayName());
Keep learning ..

Tonnie Fanadez
UX Design Techdegree Graduate 22,793 PointsAhmed Jadou man it worked!! I can't believe it, I am so excited ...you saved me endless headache.....
Tonnie Fanadez
UX Design Techdegree Graduate 22,793 PointsTonnie Fanadez
UX Design Techdegree Graduate 22,793 Points@Ahmed Jadou Thanks for bringing this up, I spent hours on this challenge and didn't figure it. I am following this discussion closely.