ij run and utf8 file

View: New views
5 Messages — Rating Filter:   Alert me  

ij run and utf8 file

by RAPPAZ Francois :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a file with sql commands: The file is encoded in utf8. I have put "derby.ui.codeset=utf8" in my derby.properties file in the derby system directory.
When I load ij with
U:\docs\jprog\derby>java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p ij.properties

And try to run the command in my file, I get
ij> ´╗┐insert into authors (name1, name2, data) values ('Abarca', 'Carolina', 'Abarca, Carolina 2');
ERREUR 42X02 : Lexical error at line 1, column 2.  Encountered: "\u00bb" (187),
after : "".

Any idea what I'm missing ?

Thanks
François

Re: ij run and utf8 file

by Knut Anders Hatlen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

RAPPAZ Francois <francois.rappaz@...> writes:

> I have a file with sql commands: The file is encoded in utf8. I have put "derby.ui.codeset=utf8" in my derby.properties file in the derby system directory.
> When I load ij with
> U:\docs\jprog\derby>java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p ij.properties
>
> And try to run the command in my file, I get
> ij> ´╗┐insert into authors (name1, name2, data) values ('Abarca', 'Carolina', 'Abarca, Carolina 2');
> ERREUR 42X02 : Lexical error at line 1, column 2.  Encountered: "\u00bb" (187),
> after : "".
>
> Any idea what I'm missing ?

Hi François,

The derby.properties file is only read by the Derby engine and not by
tools like ij, and since derby.ui.codeset is a tools property, setting
it there wouldn't help. Since you start ij with -p ij.properties, it
should be fine if you put the property setting in ij.properties.

If it still doesn't work, is there any chance that the line that causes
the error starts with a "»" character?

--
Knut Anders

Re: ij run and utf8 file

by Bernt M. Johnsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>>>>>>>>>>> RAPPAZ Francois wrote (2009-10-28 15:40:37):

> I have a file with sql commands: The file is encoded in utf8. I have put "derby.ui.codeset=utf8" in my derby.properties file in the derby system directory.
> When I load ij with
> U:\docs\jprog\derby>java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p ij.properties
>
> And try to run the command in my file, I get
> ij> ´╗┐insert into authors (name1, name2, data) values ('Abarca', 'Carolina', 'Abarca, Carolina 2');
> ERREUR 42X02 : Lexical error at line 1, column 2.  Encountered: "\u00bb" (187),
> after : "".
>
> Any idea what I'm missing ?
The two characters before the insert?

>
> Thanks
> François

--
Bernt Marius Johnsen, Staff Engineer
Database Technology Group, Sun Microsystems, Trondheim, Norway


signature.asc (196 bytes) Download Attachment

RE: ij run and utf8 file

by RAPPAZ Francois :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks a lot ! that was it: with the "derby.ui.codeset=utf8" line in ij.properties file, the sql commands were done without problem.

François

> -----Original Message-----
> From: Knut.Hatlen@... [mailto:Knut.Hatlen@...]
> Sent: jeudi, 29. octobre 2009 10:40
> To: Derby Discussion
> Subject: Re: ij run and utf8 file
>
> RAPPAZ Francois <francois.rappaz@...> writes:
>
> > I have a file with sql commands: The file is encoded in utf8. I have
> put "derby.ui.codeset=utf8" in my derby.properties file in the derby
> system directory.
> > When I load ij with
> > U:\docs\jprog\derby>java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p
> ij.properties
> >
> > And try to run the command in my file, I get
> > ij> ´╗┐insert into authors (name1, name2, data) values ('Abarca',
> 'Carolina', 'Abarca, Carolina 2');
> > ERREUR 42X02 : Lexical error at line 1, column 2.  Encountered:
> "\u00bb" (187),
> > after : "".
> >
> > Any idea what I'm missing ?
>
> Hi François,
>
> The derby.properties file is only read by the Derby engine and not by
> tools like ij, and since derby.ui.codeset is a tools property, setting
> it there wouldn't help. Since you start ij with -p ij.properties, it
> should be fine if you put the property setting in ij.properties.
>
> If it still doesn't work, is there any chance that the line that causes
> the error starts with a "»" character?
>
> --
> Knut Anders

RE: ij run and utf8 file

by RAPPAZ Francois :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That the BOM add by notepad, the things to do was putting the codeset properties in the ij.properties file as suggested by Knut
François

> -----Original Message-----
> From: Bernt.Johnsen@... [mailto:Bernt.Johnsen@...]
> Sent: jeudi, 29. octobre 2009 10:41
> To: Derby Discussion
> Subject: Re: ij run and utf8 file
>
> >>>>>>>>>>>> RAPPAZ Francois wrote (2009-10-28 15:40:37):
> > I have a file with sql commands: The file is encoded in utf8. I have
> put "derby.ui.codeset=utf8" in my derby.properties file in the derby
> system directory.
> > When I load ij with
> > U:\docs\jprog\derby>java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p
> > ij.properties
> >
> > And try to run the command in my file, I get
> > ij> ´╗┐insert into authors (name1, name2, data) values ('Abarca',
> > ij> 'Carolina', 'Abarca, Carolina 2');
> > ERREUR 42X02 : Lexical error at line 1, column 2.  Encountered:
> > "\u00bb" (187), after : "".
> >
> > Any idea what I'm missing ?
>
> The two characters before the insert?
>
> >
> > Thanks
> > François
>
> --
> Bernt Marius Johnsen, Staff Engineer
> Database Technology Group, Sun Microsystems, Trondheim, Norway