| SQL Plus Encoding Problem [message #359060] | 
			Thu, 13 November 2008 09:59   | 
		 
		
			
				
				
				
					
						
						odtufatih
						 Messages: 3 Registered: November 2008 
						
					 | 
					Junior Member  | 
					 | 
		 
		 
	 | 
 
	
		I am trying to execute a file which includes a package definition 
via sqlplus, but I am receiving an error like following: 
 
SP2-0734: "create or..." unknown command - rest of the line ignored 
 
When I view my file, it seems to start with silly characters. 
 
It goes on like this. 
 
create or replace package PKG_XYZ is .. 
 
 
The silly characters at the beginning causes sql-plus to fail. 
 
This seems to be an encoding problem. 
 
But how to solve ? 
 
Could you please help with the situation ? 
 
Thanks in advance. 
		
		
		[Updated on: Thu, 13 November 2008 09:59] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	
		
		
			| Re: SQL Plus Encoding Problem [message #359175 is a reply to message #359062] | 
			Fri, 14 November 2008 00:32    | 
		 
		
			
				
				
				
					
						
						odtufatih
						 Messages: 3 Registered: November 2008 
						
					 | 
					Junior Member  | 
					 | 
		 
		 
	 | 
 
	
		| Michel Cadot wrote on Thu, 13 November 2008 10:14 |  Hmmm... remove the silly characters? 
 
Regards 
Michel 
  |  
  
 
Thanks for the reply Michel, 
 
I am executing sql-plus automatically(in fact by ant), so I look for an unmanual solution. Why are those silly characters there(in fact when I view the file in UTF-8 encoding silly characters do not show up), and why sql plus fails to execute ? Is this something related to the NLS_LANG parameter ? What should it be to execute properly ?
		
		
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 | 
	
		
		
			| Re: SQL Plus Encoding Problem [message #359740 is a reply to message #359620] | 
			Tue, 18 November 2008 02:07   | 
		 
		
			
				
				
				
					
						
						odtufatih
						 Messages: 3 Registered: November 2008 
						
					 | 
					Junior Member  | 
					 | 
		 
		 
	 | 
 
	
		| andrew again wrote on Mon, 17 November 2008 11:39 |  sounds like the script you're running isn't for your OS. Inspect those first few bytes of the file using a hex editor (or on Unix just do an "od -x" on the file. Remove the BOM characters if the rest of the file is just plain ASCII text (no special characters). 
 
http://en.wikipedia.org/wiki/Byte-order_mark 
 
  |  
  
 
Thank you for your time and reply andrew, I have just written a java program to rewrite the file without the silly BOM characters at the beginning. Then sql-plus executes without complaining. 
 
Thanks again, for your kind interest.
		
		
		
 |  
	| 
		
	 | 
 
 
 |