Reading and writing Special Characters to Oracle DB
Hi All,
I need to insert data from CSV to Oracle DB and then use the same data for creating XML file in UTF-8 format.
I have few fields in the CSV file which has � and � special characters. I'm able to read � and write in UTF-8 , but the same procedure is resulting in some other ascii character for �.
While reading data from CSV file :
Reader l_fileReader = new InputStreamReader(p_in,"ISO-8859-1");
Can anyone help me.
Thanks,
Ramki.
Does anyone has some pointers or clues?
Similar Messages
-
10g won't recognize ellipsis and other special characters.
I'm trying to insert data into both VARCHAR2 and CLOB columns that contains characters such as ellipsis and other special characters. Oracle doesn't recognize the characters and just converts it to garbage. Is there a way to make Oracle easily recognize these characters?
For example, it won't recognize the following ellipsis in the string:
"Here we are … right now."My bad...I did look at the national character set instead.
When I performed theq query you posted, I got the following:
NLS_CHARACTERSET
WE8MSWIN1252
NLS_NCHAR_CHARACTERSET
AL16UTF16
I hope this new information helps. Also, the tool involved is SQL *Plus, but I'm currently concentrated on getting the insert to work via JDBC. Thanks in advance. -
How to save Special Characters in oracle?
Is there any way to enter special characters such as ºC ? i am using J2EE and Oracle 9 i.
When i try to enter 2ºC after updating the datbase it is converted to 2ºC when it is displayed in HTML. All special characters are prefixed with Â. Pls suggest any way to use special characters with oracle ..This has nothing do to with NLS_LANGUAGE. In general, character set processing depends on NLS_LANG setting (which is an OS setting and not a instance initialization parameter) and database character set. To understand NLS_LANG see OTN NLS_LANG FAQ http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm.
However, I think that JDBC is an exception and does not use the character set defined by NLS_LANG. See last answer in following discussion:
Re: When is NLS_LANG used ? -
Very slow painting while reading and writing doubles into file
for 15MB length file i = 7662080
for 50MB length file i = 12414368
Part of Code for writing into file follows like this:
try{
fos = new FileOutputStream("Angel.txt");
File f = new File("Angel.txt");
if(f.length() >=4)
f.delete();
fos = new FileOutputStream("Angel.txt");
dos = new DataOutputStream(new BufferedOutputStream(fos,1000000));
int x=0;
double y_last, y_new;
for(int j=0 ;j<i ;j++)
if(some condition)
y_new = ....;
try{
//previously in vectors
y_last = y_new;
vect.add(new Line2D.Double(x, y_last, x, y_new)_;
dos.writeDouble(y_new);
}catch(Exception e){System.out.println(e);}
dos.close();
fos.close();
x++;
}catch(Exception excp){System.out.println(excp);}
part of code for reading from file follows like this:
public void paint(Graphics g)
try{
double y1, y2 =0;
Line2D.Double doub;
raf = new RandomAccessFile("Angel.txt","r");
dis = new DataInputStream(new BufferedInputStream(new FileInputStream(raf.getFD(),1000000)));
raf.seek((rect.x*8));
for (int i = 0/any value; (i < value as per choice); i++)
g2.setStroke(new BasicStroke(0)); //2
y1 = y2;
y2 =dis.readDouble();
doub=new Line2D.Double(i,y1,i,y2);
g2.draw(doub);
dis.close();
raf.close();
}catch(Exception excp){System.out.println(excp);}
I tried using Object Streams but NotSerializable Exception is thrown as Line2D.Double objects
are not serialized.
Any idea to make reading and writing into file specially from MB files faster is appreciated.Why are you reading in the file in the paint method ?
Create your data once before painting.
I think you should explain what is your goal and what behavior you want.
Denis -
I have set up my work Exchange email/calendar. After setting up I am getting passcode expired message and asking for changing the passcode with a 16 + digit and 4 special characters. No combination of numberic, alphanumeric, special characters is working. Help!!
I have set up my work Exchange email/calendar. After setting up I am getting passcode expired message and asking for changing the passcode with a 16 + digit and 4 special characters. No combination of numberic, alphanumeric, special characters is working. Help!!
-
Vbscript to rename files and replace special characters
Dear Exprt,
would you please help to add addtional requirement for rename and replace special characters for file
by the below script i can re name.
strAnswer = InputBox("Please enter folder location to rename files:", _
"File rename")
strfilenm = InputBox("Enter name:", _
"Rename Files")
Set FSO = CreateObject("Scripting.FileSystemObject")
Sub visitFolder(folderVar)
For Each fileToRename In folderVar.Files
fileToRename.Name = strfilenm & fileToRename.Name
Next
For Each folderToVisit In folderVar.SubFolders
visitFolder(folderToVisit)
Next
End Sub
If FSO.FolderExists(strAnswer) Then
visitFolder(FSO.getFolder(strAnswer))
End If
[email protected]Thx would you please look below what wrong in its run nothing happend no error
strAnswer = InputBox("Please enter folder location to rename files:", _
"Test")
strfilenm = InputBox("Enter name:", _
"Rename Files")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set regEx = New RegExp
'Your pattern here
Select Case tmpChar
Case "&"
changeTo = " and "
Case "/"
changeTo = "_"
Case Else
changeTo = " "
End Select
regEx.Pattern = tmpChar
Sub visitFolder(folderVar)
For Each fileToRename In folderVar.Files
fileToRename.Name = strfilenm & fileToRename.Name
fileToRename.Name = regEx.Replace(fileToRename.Name, tmpChar)
Next
For Each folderToVisit In folderVar.SubFolders
visitFolder(folderToVisit)
Next
End Sub
[email protected] -
Capturing returns and other special characters
Greetings,
I'm curious to know what is 'normally' done to capture
returns and other special characters from textareas. I want my user
to be able to insert 'control' characters into the text area to
allow them to provide some structure to the information they're
entering. At the moment, I'm processing the text char by char and
working out if it's an 'enter' or whatever, then appending a
'<br />' to the string before I store it and so on.
Is there a more established way to do this sort of
thing?Use the replace function to replace either chr(10) or chr(13)
with a break tag. It's using cold fusion functions to accomplish
the same thing you appear to be doing manually. -
Problem on reading and writing from from a *.txt file
I get Problem on reading and writing from from a *.txt file. The following is the read() method...
The software said the DataInputStream is depreciated. Can anyone help me please?
public void read()
File file = new File("C://Documents and Settings//Charles//My Documents//Brunel//EE2065//Assignment and Lab//Assignment 4 and Lab 4//data.txt");
FileInputStream in = null;
String str = "";
try
in = new BufferedReader(file);
//in = new FileInputStream(file);
for(;;)
str = new BufferedReader(in).readLine();
//str = new DataInputStream(in).readLine();
if(str == null)
break;
System.out.print(str);
in.close();
catch(IOException e)
System.err.println("execution error: " +e);
}Thank you for your reply. I have made some change. However, there is an incompetable type found error.
in = new BufferedReader(new InputStreamReader(in));The following are all of the code.
public void read()
File file = new File("C://Documents and Settings//Charles//My Documents//Brunel//EE2065//Assignment and Lab//Assignment 4 and Lab 4//data.txt");
FileInputStream in = null;
//BufferedReader in = null;
String str = "";
try
in = new BufferedReader(new InputStreamReader(in));
//in = new FileInputStream(file);
for(;;)
BufferedReader Bstr = new BufferedReader(new InputStreamReader(in));
//str = new BufferedReader(in).readLine();
//str = new DataInputStream(in).readLine();
if(str == null)
break;
System.out.print(str);
in.close();
catch(IOException e)
System.err.println("execution error: " +e); -
I have duplicated a project to work on another computer. The project opens fine but when I import new footage/audio files I get this message. "File importer detected an inconsistency in the file stucture of (file name). Reading and writing this file's metadata (XMP) has been disabled." Then I can't play my timeline and Premier Pro crashes. I have to force quit and restart my computer to continue working. What does this error really mean? How do you rectify?
Our workflow requires that we duplicate projects to make updates because we are frequently revising but need to keep original project unchanged and intact.I have a similar issue and message , but occurs when I import AVI clips from OnLocation CS4 to Premier Pro CS4.
-
I updated Itunes today to the latest version. Windows 7 64bit. None of my drivers work and get an error when itunes starts, about registry setting for reading and writing dvds and cds missing. Anyone else have the same issue. I downloaded itunes again, reinstalled still have same issue.
I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
iTunes for Windows: "Registry settings" warning when opening iTunes -
IPhone4 how through the USB mobile phone file reading and writing?
iPhone4 how through the USB mobile phone file reading and writing?
No idea what you are asking.
Please explain -
Switcher - Reading and Writing External IEEE HDD's
Greetings,
i'm trying to read and write with my external ieee drive on windows and the mac pro. it's format is ntfs, and is read only on the mac pro.
i am admin and can't seem to change the permissions to read / write.
the over all idea is i need to go back and forth between operating systems reading and writing from both sides of the house.
here's a snapshot.
http://briankross.com/images/500GBIEEEHDD.jpg
Mac Pro Mac OS X (10.4.8)Unfortunately, no. In order to convert the drive to FAT32 it must be re-partitioned which is a destructive process.
Why reward points?(Quoted from Discussions Terms of Use.)
The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values. -
Reading and Writing large Excel file using JExcel API
hi,
I am using JExcelAPI for reading and writing excel file. My problem is when I read file with 10000 records and 95 columns (file size about 14MB), I got out of memory error and application is crashed. Can anyone tell me is there any way that I can read large file using JExcelAPI throug streams or in any other way. Jakarta POI is also showing this behaviour.
Thanks and advanceSorry when out of memory error is occurred no stack trace is printed as application is crashed. But I will quote some lines taken from JProfiler where this problem is occurred:
reader = new FileInputStream(new File(filePath));
workbook = Workbook.getWorkbook(reader);
*sheeet = workbook.getSheet(0);* // here out of memory error is occured
JProfiler tree:
jxl.Workbook.getWorkBook
jxl.read.biff.File
jxl.read.biff.CompoundFile.getStream
jxl.read.biff.CompoundFile.getBigBlockStream Thanks -
Quickest method for reading and writing files
Hi
I need help regarding file operations.(Reading and Writing). Currently I am using BufferedReader and BufferedWriter to read and write files. But the files (XML) are very huge files(from 30 -50 mb). This is slowing the application to a great extent. Is there any other approach to perform the above mentioned operations on XML files in a fast manner.
Thank You
Mansoor.Hi
Can u let me know how to use the java.nio pavkage for primitve data types(int,float..., boolean). I have tried it but found no success.
Thank You
Mansoor -
ImageIo: reading and writing a jpeg corrupts the image
Sometimes, ImageIo manages to read an image wrong. If I simply read() and write() the
image without any transformations, the image writtten will have its colors all wrong. The
output image format here doesn't matter.
An example image is: http://bram.name/~brama/pics/test.jpg
And output after reading and writing it: http://bram.name/~brama/pics/test_output.jpg
Is the image io lib to blame, or is it a broken image? The image displays fine in other programs.
Message was edited by:
Bram_AUse this code to load the image.
From my experience it is much more stable and also faster.
My guess is that the problem is related to the ICC profile embeded in the JPEG.
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new URL("http://www.stack.nl/~brama/pics/imageio.jpg").openStream());
BufferedImage image = decoder.decodeAsBufferedImage();
Maybe you are looking for
-
Why is my printer not recognized by my computer?
I recently replaced my apple airport extreme 3rd generation with an optimum smart router. My network is now up and running. When I plugged in my HP Photosmart C4400 series printer into the usb port for my normal wireless printing, the usb light turne
-
Grapher... name of the function on the graph ?
Hello, Could you tell me if it's possible to put the name of the function (with mathematical symboles) directly on the graph ? If yes, how do you do ? Thank you
-
Function Module to Delete ODS Data based on Request
Hi All, Is there any specific function module to delete ODS data based on Request. I found the program RS_DEL_ODS_1 which is using the FM RSAR_ODS_API_DEL. But this FM is deleting the request at PSA level. Is there any alternate FM?Or is there any AB
-
Hi there, DW 8.0.2 ; ASP VBScript and MS Access 2000 On a web site, I have a page which displays with a "30" repeat region, all registered customers. Is it possible, and how, to have on this page a "Delete" button as well as an "Edit" button. With ev
-
Install Error when trying to install Measurement Studio 7.0
I am receiving two erros when trying to install Measurement Studio 7.0: "The installer cannot setup Measurement Studio for Visual C++ while Visual C++ is open. Please make sure Visual C++ is closed and click ok." "Although you have the proper version