pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed65279 Invisible ASCII Character
3+ messages / 2 participants
[nested] [flat]
* 65279 Invisible ASCII Character
@ 2018-07-17 09:30 ramsiddu007 <ramsiddu007@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: ramsiddu007 @ 2018-07-17 09:30 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org; pgsql-hackers@lists.postgresql.org; +Cc: Monalee Bhandge <monalee.bhandge@epps-erp.com>
Hi all,
Today i got one problem what i have saved more that one procedures in
a folder. After i have concatenate those files into single file through
shell script. After am trying to run that single file in my server, it was
showing syntax error. If i remove first character it's run. That first
character is invisible, I have checked that *ascii* value, it is *65279*.
How can i overcome this problem. I want to run my single file without this
error.
By below command i am concatenating individual scripting files to single.
*:> cat *.* > <file_name>.sql*
select ascii('');
select chr(65279);
select length('');
Plz. give me suggestions, it's blocker to my work.
Thanking you,
--
*Best Regards:*
Ramanna Gunde
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: 65279 Invisible ASCII Character
@ 2018-07-17 10:12 Christoph Moench-Tegeder <cmt@burggraben.net>
parent: ramsiddu007 <ramsiddu007@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Moench-Tegeder @ 2018-07-17 10:12 UTC (permalink / raw)
To: ramsiddu007 <ramsiddu007@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org, pgsql-hackers@lists.postgresql.org, Monalee Bhandge <monalee.bhandge@epps-erp.com>
## ramsiddu007 (ramsiddu007@gmail.com):
> If i remove first character it's run. That first
> character is invisible, I have checked that *ascii* value, it is *65279*.
That's not an ASCII-value, ASCII has 8 bits at most.
What you've got there is a UTF-16 Byte Order Mark: 65279 is 0xfeff
(one of the well-known constants).
I'd suggest you get your editor configured to write files without
BOM. Maybe there's a workaround via locale settings - but I have
no machine with an UTF-16 locale available. Another approach is using
recode on your files before concatenating.
This question isn't really for pgsql-hackers - I'm redirecting to -general.
Regards,
Christoph
--
Spare Space
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: 65279 Invisible ASCII Character
@ 2018-07-17 10:25 ramsiddu007 <ramsiddu007@gmail.com>
parent: Christoph Moench-Tegeder <cmt@burggraben.net>
0 siblings, 0 replies; 3+ messages in thread
From: ramsiddu007 @ 2018-07-17 10:25 UTC (permalink / raw)
To: pgsql-general@postgresql.org
Thanks, I'll look into it.
On Tue, Jul 17, 2018 at 3:42 PM Christoph Moench-Tegeder <cmt@burggraben.net>
wrote:
> ## ramsiddu007 (ramsiddu007@gmail.com):
>
> > If i remove first character it's run. That first
> > character is invisible, I have checked that *ascii* value, it is *65279*.
>
> That's not an ASCII-value, ASCII has 8 bits at most.
> What you've got there is a UTF-16 Byte Order Mark: 65279 is 0xfeff
> (one of the well-known constants).
> I'd suggest you get your editor configured to write files without
> BOM. Maybe there's a workaround via locale settings - but I have
> no machine with an UTF-16 locale available. Another approach is using
> recode on your files before concatenating.
>
> This question isn't really for pgsql-hackers - I'm redirecting to -general.
>
> Regards,
> Christoph
>
> --
> Spare Space
>
--
*Best Regards:*
Ramanna Gunde
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-07-17 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 09:30 65279 Invisible ASCII Character ramsiddu007 <ramsiddu007@gmail.com>
2018-07-17 10:12 ` Christoph Moench-Tegeder <cmt@burggraben.net>
2018-07-17 10:25 ` ramsiddu007 <ramsiddu007@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox