Skip to content

Instantly share code, notes, and snippets.

@osima
Created August 22, 2011 03:27
Show Gist options
  • Select an option

  • Save osima/1161594 to your computer and use it in GitHub Desktop.

Select an option

Save osima/1161594 to your computer and use it in GitHub Desktop.
Try to find char u3000.
import java.io.*;
public class Test{
private static char SPACE='\u3000';
public static void main(String[] args){
if(args.length<1){
System.exit(0);
}
File f=null;
String ENC="SJIS";
if(args.length>=1)
f=new File(args[0]);
if(args.length>=2)
ENC=args[1];
try{
BufferedReader br= new BufferedReader(new InputStreamReader( new FileInputStream(f),ENC));
String line=null;
while( (line=br.readLine())!=null ){
for(int i=0; i<line.length(); i++){
if(SPACE==line.charAt(i)){
int code=(int)(line.charAt(i));
System.out.println("Found ideographics space: "+Integer.toHexString(code) );
}
else{
System.out.println(line.charAt(i));
}
}
}
br.close();
}
catch(Exception ex){
ex.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment