• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Separator for big Numbers (for ex. 123'456'789) instead of printing 123456789  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I tried to separate my java output with this Code in Eclipse:



But I always get the console output:


15?536?714?310?352?335?821?263?449?270?861

Why I get this sign "?" instead of " ' "??!! I want to see:

15'536'714'310'352'335'821'263'449'270'861

Pperhaps I had set the wrong code point in Eclipse. But I tried every known cp (850, 1252, ISO-8859-1, UTF-8, UTF-16) in Eclipse Windows-Preferences-Workspace but i've alwas the same wrong output. Perhaps it's an Eclipse problem because when I enter the source code in a text file and save it as Test.java and compile it with javac an run with java Test, the output is what I want: 15’536’714’310’352’335’821’263’449’270’861

I saw somewhere in a forum, that I can set the code point in the source code globally but I' forgot how and where I saw it. But I remember the Code started with system......

Thanks for your help in advance.

Mike
 
Saloon Keeper
Posts: 10230
216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

Nothing to do with character encoding.

The font that Eclipse uses for its output window probably just doesn't have a symbol for the grouping separator that is specific to your default locale.
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!