• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

about the read() in the FileReader class...

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I open a file using FileReader, then use the read() method to read the file in to a char array, but in the xp of English version it will read some unknown characters like small cubes,(hell knows what is that!),but in Chinese version of xp , it reads pretty ok. Gonna confused to death!
somebody kind who is willing to help me?thanks a lot!
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
floatingkent Zhang,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would guess that the character array contains characters that the font in use by the english machine cannot display. If you want the characters to be displayed on the english machine, you'll likely have to specify that the appropriate font be used.
 
Jian Zhang
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot for your help,but could you tell me how to change the font in the character array?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There isn't a font in the character array to be changed. A font to be used can be specified when text is displayed on certain components.
I'm moving this to the Swing / JFC / AWT forum where they like to talk about this fancy display stuff.
Also, floatingkent is not an improvement over your original display name. Again, please change your display name to comply with The JavaRanch Naming Policy. We'd like to a first name, a space, and a last name. Note that "floating kent" won't qualify as it's obviously fictitious.
It may seem obnoxious that we're asking you to change your display name to conform with one of our few policies (another being "be nice"), but what this community has to offer in terms of learning assistence makes this small request worth the effort of fulfilling.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic