This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes Special chars are getting in bsv file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Special chars are getting in bsv file" Watch "Special chars are getting in bsv file" New topic
Author

Special chars are getting in bsv file

Krish Yeruva
Ranch Hand

Joined: Sep 17, 2008
Posts: 58
Hi Team,
In oracle, one of my stored proc is using tables and views and generating the xxx.bsv file. In this bsv file, some special chars(Â) are getting displayed. I have checked the tables and views, is there any special chars in them. But tables and views doesn't have any funky chars in it. But the xxx.bsv file is having the funky chars(Â). So can you please suggest me what modification I can do to remove those funky chars(Â) in xxx.bsv file?

Eg:
FOUSA00BWW|FSUSA001YS||Fidelity Advisor® Strategic Income Fund Class T|Fidelity Advisor® Strategic Income

Thanks In Advance
Krishna


Thanks & Regards
KITTU
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41634
    
  55
I would imagine that whichever application you use to display the CSV doesn't employ the right encoding. Which encoding is used for creating the file?


Ping & DNS - my free Android networking tools app
Krish Yeruva
Ranch Hand

Joined: Sep 17, 2008
Posts: 58
Hi Ulf Dittmer,
Thanks for your reply. The destination file is getting created in Winscp(NAS location). So I am trying to open the same file by giving right click on the file and selecting the Edit option. Don't mind how can I check the encoding of such a file?Can't I make any changes in the stored procedure to filter those funky chars in xxx.bsv file?

Note: The file i am trying to open is xxx.bsv, not xxx.csv.







[Thumbnail for WinscpFileHeader.PNG]

Krish Yeruva
Ranch Hand

Joined: Sep 17, 2008
Posts: 58
We can see encoding from preferences tab-->Editors-->Encoding . But in my Winscp i am not able to see the encoding option..



[Preferences.PNG]

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41634
    
  55
The encoding has nothing to do with WinSCP, it's a feature of the file. Open it in an application that makes it easy to try out different encodings, like a web browser.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I've frequently seen text which was encoded in UTF-8 displayed in other encodings, and those strange characters are typically what you see. In your case it looks like there's a ™ character being mangled. So I would suggest telling your editor to use UTF-8 when opening it.
Krish Yeruva
Ranch Hand

Joined: Sep 17, 2008
Posts: 58
Hi Ulf Dittmer and Paul,
Thanks a lot for you response.
I found one solution to convert the text with funky characters.
In stored procedure iam using convert('Character set','UTF8'), this solved my requirement.
Oracle has nearly the following character sets (as per I know, ofcourse I googled )
US7ASCII, WE8ISO8859P1, EE8MSWIN1250, WE8MSWIN1252, WE8EBCDIC1047, JA16SJISTILDE, ZHT16MSWIN950, AL32UTF8, UTF8
Now I would like to convert into UTF8 whatever the character set it is.
So any one can help me out. How I can achieve this requirement in oracle.

Thanks in advance.



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41634
    
  55
I'm not sure what you're asking. If the file is created as UTF-8 (which is how I understand your post), then that solves the problem, no?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Special chars are getting in bsv file