• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Sybex OCP Java 8 Study Guide - Page 420: example omitting non-ASCII letters  RSS feed

 
Ranch Hand
Posts: 74
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 420, the skipping example:

This example is working correctly with american letters while reading just one byte for each character. It's not working with special characters like german umlaut (f.e. ü).
The code with input TüGERS will output TER.
In Java the primitive char takes two bytes.
 
Marshal
Posts: 60136
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This would appear to be a different question, so should be in a thread of its own.
Please supply more details about the program and how it is going wrong.
 
author & internet detective
Sheriff
Posts: 38569
656
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Juerg,
You are correct. The exam doesn't cover "special" characters like that. It's a bit US centric in that regard. For that matter, it is US centric with regard to time zones too.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!