Prefixing with special character  in the column output generated from vsql
Hi,
I am trying to redirect the vsql output to a file with below SQL:
it is prefixing with £ character instead of just £ symbol. Any ideas why it is adding additional character Â. It works fine with $ symbol.
select column1, '£'||CAST (ROUND(cost) AS NUMERIC(15,2)) from table1;
Thanks for your help.
Ramesh.
I am trying to redirect the vsql output to a file with below SQL:
it is prefixing with £ character instead of just £ symbol. Any ideas why it is adding additional character Â. It works fine with $ symbol.
select column1, '£'||CAST (ROUND(cost) AS NUMERIC(15,2)) from table1;
Thanks for your help.
Ramesh.
0
Comments
Alter that restart you console(putty terminal) and try again.
See example bellow(with right charset)
Now see you example (where charset are different)
I hope this helped.
Thank you so much for quick reply. I tried your select, it shows $ even though I set en_GB for locale.
I have UTF8 in my putty terminal.
Thanks
Ramesh
I am not sure how you can handle different langs only by using session variables.
See example : I might be wrong ! if any out there with a different opinion please fell free to add any.
For details i go over the Vertica locales in this articles article1 article2.
The site reflect my opinions only based on my daily work with Vertica(so use with care)
so when it is US record, it prefixes the $ with the CONCAT correctly. But when it is concatenating pound symbol it adds that extra character Â.
Thanks
Ramesh.
select column1, '£'||CAST (ROUND(cost) AS NUMERIC(15,2)) from table1;
Open the output file in Excel you will see the special character  also along with pound.
Or run "od -c " on the output file, you will see 302 243 codes.
Thanks.