aspose file tools*
The moose likes Java in General and the fly likes bad characters (MS Windows-only chartacters) in two Java files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "bad characters (MS Windows-only chartacters) in two Java files" Watch "bad characters (MS Windows-only chartacters) in two Java files" New topic
Author

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

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
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 ?


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12784
    
    5
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

Joined: Jul 17, 2008
Posts: 844
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

Joined: Mar 22, 2000
Posts: 12784
    
    5
Here is what I use:
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
thanks cool...but to check whether bad characters are there or not, explicitly is to complie in cygwin or linux.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38823
    
  23
You can try reading the text file with the usual techniques, then use regular expressions to look for the smart quotes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bad characters (MS Windows-only chartacters) in two Java files