Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bad characters (MS Windows-only chartacters) in two Java files

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These characters are not interpreted correctly in Linux.

export/bea/Win-cm-int/cc/projects/cycle/core/src/main/com/cycleus/cycleton/wizard/entryvalidation/ValidateManifest.java:1845: warning: unmappable character for encoding UTF8

this was recently notified by my colleague. i don't know why linux complains. In my window using ant i compiled fine. is there any way before i check in my code, i could know if there are such bad characters present or not ?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible that these could be the MS Word "smart punctuation" characters - is somebody is editing source code using Word?

They also cause trouble for XML documents.

Bill
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes you are right. other than compiling through the linux box. is there other tool available in windows to get to know about the bad characters.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is what I use:
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks cool...but to check whether bad characters are there or not, explicitly is to complie in cygwin or linux.
 
Campbell Ritchie
Sheriff
Posts: 48424
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try reading the text file with the usual techniques, then use regular expressions to look for the smart quotes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic