Home » SQL & PL/SQL » Client Tools » SQL Plus Encoding Problem
SQL Plus Encoding Problem [message #359060] Thu, 13 November 2008 09:59 Go to next message
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 #359062 is a reply to message #359060] Thu, 13 November 2008 10:14 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Hmmm... remove the silly characters?

Regards
Michel
Re: SQL Plus Encoding Problem [message #359175 is a reply to message #359062] Fri, 14 November 2008 00:32 Go to previous messageGo to next message
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 #359182 is a reply to message #359175] Fri, 14 November 2008 00:51 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is in your script file, so remove the characters from the script.

Regards
Michel
Re: SQL Plus Encoding Problem [message #359620 is a reply to message #359182] Mon, 17 November 2008 11:39 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
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

Re: SQL Plus Encoding Problem [message #359740 is a reply to message #359620] Tue, 18 November 2008 02:07 Go to previous message
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.
Previous Topic: CLOB in OEM
Next Topic: SET ECHO OFF does not work
Goto Forum:
  


Current Time: Fri Dec 09 00:19:13 CST 2016

Total time taken to generate the page: 0.09389 seconds