ZHT16DBT - UNICODE convertion in JAVA
Please help me how to make string convertion between different code.
I have a database in ZHT16DBT code. How to convert the ZHT16DBT code to UNICODE in Java when doing any query statement from that database.
the following is the code i tried, but not work
int oracleID=CharacterSet.ZHT16DBT_CHARSET;
CharacterSet gb=CharacterSet.make(oracleID);
OracleResultSet rs=(oracle.jdbc.driver.OracleResultSet)st.executeQuery("select * from test");
oracle.sql.CHAR ch = (oracle.sql.CHAR) rs.getOracleObject(1);
ch = new oracle.sql.CHAR(ch.getBytes(), gb);
Thanks for your help...
No - because whatever that char is, it's not an 'n'. Also, this has nothing to do with fonts, but encoding, although not even that is an issue here. You want to do a mapping of some sorts.
(And there are no functions in Java. The things one calls are named "methods".)
Similar Messages
-
Convert Below Java code equivalent to c# windows store app.
Hi
please help me " To convert Below Java code equivalent to c# windows store app."
private String SecretKey = "enctsbqrm6hxyjfa";
public byte[] encrypt(String text) throws Exception
if(text == null || text.length() == 0)
throw new Exception("Empty string");
// convert key to bytes
byte[] keyBytes = SecretKey.getBytes("UTF-8");
// Use the first 16 bytes (or even less if key is shorter)
byte[] keyBytes16 = new byte[16];
System.arraycopy(keyBytes, 0, keyBytes16, 0, Math.min(keyBytes.length, 16));
// convert plain text to bytes
byte[] plainBytes = text.getBytes("UTF-8");
// setup cipher
SecretKeySpec skeySpec = new SecretKeySpec(keyBytes16, "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS7Padding");
//byte[] iv = new byte[16]; // initialization vector with all 0
cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
// encrypt
byte[] encrypted = cipher.doFinal(plainBytes);
return encrypted;
Thanks
NitinHello Nitin,
Your current requirement is beyond the scope of our support for this fourm which is used to Discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection.
If you want to know how to encrypt/decrypt in windows store app, I suggest that you could post a it to:
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/home?forum=winappswithcsharp
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Converting a java file to a web service
How can i convert a java file to a web service,And then invoke that service by making my other java file.
You can convert your java file into a WSDL with the WSDL2Java utility in Axis. This will create a definition that will be accessible by potential clients.
To deploy your java class, you can use Axis in a Web Server of your choice (Tomcat, Apache). All you need to do is run the Axis Admin Client for a deploy.wsdd file and point your client to the IP:PORT.
Very straightforward.
http://ws.apache.org/axis/java/user-guide.html
Hope it helps.
SBO -
Cannot convert from java.util.Date to java.sql.Date
In the below code am trying to get the current date and 60 days prior date:
Date todayDate;
Date Sixtydaysprior;
String DATE_FORMAT = "MM/dd/yy";
DateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
Calendar cal = Calendar.getInstance();
todayDate = sdf.parse(sdf.format(cal.getTime()));
cal.add(Calendar.DATE, -60);
Sixtydaysprior = sdf.parse(sdf.format(cal.getTime()));I have imported following files:
<%@page
import="java.util.Calendar,
java.text.SimpleDateFormat,
java.text.ParseException,
java.util.*"
%>Shows up following error msg:
Type mismatch: cannot convert from java.util.Date to java.sql.Date
Thanks.
Edited by: MiltonDetroja on May 22, 2009 11:03 AMShows up following error msg:
Type mismatch: cannot convert from java.util.Date to java.sql.Date
I don't think this exception is thrown from the portion of code you have shown. As clearly specified in exception message, you cannot cast an instance of java.util.Date to java.sql.Date. you will need to do something like this
java.util.Date today = new java.util.Date();
long t = today.getTime();
java.sql.Date dt = new java.sql.Date(t); -
Convert from java file to cap file
Dear Pro,
Please help me this problem,
I'm building a applet in eclipse. Now, I want to convert from java file to cap file to load it into javacard.
I need repair what tools and do what, please help me!
Thanks & Best Regards,
KeillyNguyenRun -> Run Configuration -> Double click Java Card Application -> Click Run
After that, the CAP file will be generated in the bin directory.
Are you come from VN? Im Vietnamese :) Nice to meet you -
API for converting a Java object into XML?
Do you know of any Java API that I could use to convert a Java
object into its equivalent XML representation?
For example if I have a class called "Foo" with variables va, vb
and I have an instance of Foo with va having the value 1 and vb
having the value 2, I would like be able to generate the
following XML fragment:
<Foo>
<va>1</va>
<vb>2</vb>
</Foo>
Thanks,
-- Rob
nullRob Tan (guest) wrote:
: Do you know of any Java API that I could use to convert a Java
: object into its equivalent XML representation?
: For example if I have a class called "Foo" with variables va,
vb
: and I have an instance of Foo with va having the value 1 and
vb
: having the value 2, I would like be able to generate the
: following XML fragment:
: <Foo>
: <va>1</va>
: <vb>2</vb>
: </Foo>
: Thanks,
: -- Rob
There is none that I know of.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null -
SAP Businness connector 4.6 - post SAP ECC Unicode convertion
Hi,
after Unicode convertion of our ECC 6.0 system, SAP Bussiness connector create XML file with encoding UTF-16 (in the past was iso-8859-1). Our custom applictions, that read this .XML files, can't process this files with UTF.16 until we have manualy change from UTF-16 to UTF-8 or iso-8859-1
Now:
<?xml version="1.0" encoding="utf-16"?>
In the past:
<?xml version="1.0" encoding="iso-8859-1"?>
Can I set into Businness Connector right encoding?
Regards.Hi,
>You can try to uncheck the Unicode settings in the RFC destination in SAP (transaction SM59) and see how the content arrives >then. But if I remember correctly, this does also not produce the desired effect in BC (receive in iso-8859-1).
already try it without success.
>Apart from that, I see no other option than change the encoding via a BC service or to change the encoding on the application >which receives the FTP file.
OK.
Regards. -
Can we install XI3.0 SR1 on a NON-UNICODE SAP ABAP + Java System
Hello,
I am trying to install XI 3.0 SR1 but i don't have an UNICODE SAP ABAP + Java System. So my question is, that is it possible to install XI on a NON-UNICODE SAP ABAP + JAVA Syatem?Xi 3.0 is an non unicode system, so i guess you can start installing the Xi3.0.....
might be helpfull
https://websmp201.sap-ag.de/unicode.
Message was edited by:
Nisar Khan -
Unicode convertion source=target
Hi,
I'm tring a Unicode convertion on a send-box system just copied from production system. I'm in export phase now in our Solaris 10 SPARC + Oracle 10.2.04 box
For the import I must use the same server, same <SID> name and system number... is it necessary to unistall previus ASCII istance and then re-install in Unicode? ... ora can I switch only the kernel from ASCII 2 Unicode? ... how?
Regards.
Ganimede Dignan.Source system tablespaces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ZNASTD
PSAPZNASTI
PSAPZRESBD
PSAPZRESBI
PSAPZS022D
PSAPZS022I
PSAPZS026D
PSAPZS026I
PSAPZS027D
PSAPZS027I
PSAPZS033D
PSAPZS033I
PSAPZVBAPD
PSAPZVBAPI
PSAPZVBFAD
PSAPZVBFAI
PSAPZVBPAD
PSAPZVBPAI
PSAPZVBRPD
PSAPZVBRPI
SYSAUX
SYSTEM
But SAPinst show me only... on advanced db configuration:
PSAPSR3
PSAPSR3700
PSAPSR3FACT
PSAPSR3ODS
PSAPSR3USR
SYSAUX
PSAPUNDO
PSAPTEMP
SYSTEM
Why? -
hi. i have converted my java app to a java web start application, but only one thing doesnt work. When a button is pressed the app reads a serialised file (which is in the same directory). This works when i run it from my computer, but it doesnt work when the app and the file are uploaded on the server.?!
heres my code:
FileIO io = new FileIO();
java.net.URL u1 = GUIMain3.class.getResource("images/built_population.pop");
ArrayList<Node[]> n = null;
try {
n = (ArrayList<Node[]>) io.readURI(u1.toURI());
// JOptionPane.showMessageDialog(null, u1.toURI().toString(), "Error", JOptionPane.ERROR_MESSAGE);
} catch (URISyntaxException ex) {
Logger.getLogger(GUIMain3.class.getName()).log(Level.SEVERE, null, ex);
//JOptionPane.showMessageDialog(null, "Error", "Error", JOptionPane.ERROR_MESSAGE);
}any ideas?Is the file within the JAR? Getting a resource from within the JAR which has the application files in it as well isn't as simple as just using a relative path.
-
Mediator To Spring Error-Could not convert from java interface to interface
Hi,
I have a requirement to using a Spring component and my composite application would be File Read -> Mediator -> Spring Component -> File Write.
I have to read a file and using mediator map the same to the Spring input and write the Spring component output to a file.
I have created a Java interface ( Package Name - transformtospring , Interface Name - TransformInterface) and also created a Java Class ( TransformImpl ) which implements the Interface in this package. Saved all these artifacts in SCA-INF/src folder of the application.
My Spring Bean configuration file is as follows ( saved the file in the same folder as composite.xml )
<?xml version="1.0" encoding="windows-1252" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:sca="http://xmlns.oracle.com/weblogic/weblogic-sca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool-2.5.xsd http://xmlns.oracle.com/weblogic/weblogic-sca META-INF/weblogic-sca.xsd">
<!--Spring Bean definitions go here-->
<bean class="transformtospring.TransformImpl" name="TransformBean"/>
<sca:service name="TransformService" target="TransformBean"
type="transformtospring.TransformImpl"/>
</beans>
I have created a Spring Context which uses the above Spring Configuration. When i tried to map the mediator output to Spring , i'm getting an error shown below.
" Could not convert from java interface to interface type wsdl . Exception=java.lang.ClassNotFoundException transformtospring.TransformImpl "
Please do let me know where exactly i'm doing wrong.
Regards,
Sri.Hi All,
I could able to work this one out now !!!
But i'm having an issue mapping the input to this service. The method signature for the service is as follows:
public byte[] processData(byte[] input) throws Throwable{
So the input for this Service is a byte array. Now i'm mapping the data from a File Input ( Read File - opaqueElement ) to this service directly ( using mediator ).
Now when i have looked into the message in the Enterprise Manager, following is the message structure from Read File input to the service.
<message>
<properties>
<property name="tracking.compositeInstanceId" value="10009"/>
<property name="tracking.ecid" value="bcd04297e25136e7:4869a9c:13316255efc:-8000-0000000000001f79"/>
<property name="tracking.conversationId" value="TJ9PCcbtu3S0DA0GuxsGx13RYUb1NxHNndfk2PC8ukk."/>
</properties>
<parts>
<part name="parameters">
<ns0:processCollaboration>
<arg0>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bnMwOkFkZDJJbnB1dCAgeG1s bnM6eHNpPSdodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZScgeG1sbnM6 bnMwPSd1ay5jby5qZHdpbGxpYW1zLkFkZDJJbnB1dCcgeHNpOnNjaGVtYUxvY2F0aW9uPSd1ay5j by5qZHdpbGxpYW1zLkFkZDJJbnB1dCByZXF1ZXN0LnhzZCcPG5zMDpudW0xPjEwPC9uczA6bnVt MT48bnMwOm51bTI+MTY8L25zMDpudW0yPjwvbnMwOkFkZDJJbnB1dD4=+</arg0>
</ns0:processCollaboration>
</part>
</parts>
</message>
and the corresponding response message ( No output ) back from the service is:
<message>
<properties>
<property name="tracking.compositeInstanceId" value="10009"/>
<property name="tracking.ecid" value="bcd04297e25136e7:4869a9c:13316255efc:-8000-0000000000001f79"/>
<property name="componentName" value="ProcessCollab"/>
<property name="tracking.conversationId" value="TJ9PCcbtu3S0DA0GuxsGx13RYUb1NxHNndfk2PC8ukk."/>
<property name="compositeDN" value="default/CollaborationToSpring!1.0*soa_a8da1da7-f98f-4935-8d20-da9e7bc003cc"/>
</properties>
<parts>
<part name="parameters">
<processCollaborationResponse>
<return/>
</processCollaborationResponse>
</part>
</parts>
</message>
I have included System.out statements in my Java class , but its not printing anything in the logs.
I'm under the impression that the underlying infrastructure ( mediator ) transparently encodes and decodes data from base64Binary to java byte array. So could anyone help me on this !!!
Regards,
Sri. -
Could not convert from java interface to interface type wsdl ??
i have a problem wheni have a problem when i develop bpel using mediator and wire to ejb service. When the mediator wire to ejb service, i found the error : Could not convert from java interface to interface type wsdl.... How to solve the problem?
I followed the case closely (with the same name of classes, methods, etc), but still get the error: “Could not convert from java interface to interface type wsdl.Exception=nl.amis.calculator.Calculator”. I created a Java class to test the lookup and function correctly. However, when I try to wire a Mediator to this Reference, I run into an Interface Conversion Error. I’ve included the line javaInterface = “nl.amis.calculator.Calculator” in file composite.xml, but still get error. Could you help me?
-
Syscopy (during Unicode convertion): Import on same tablespace layout
Hi forum,
we're working on a Unicode convertion of our ECC landscape made of Solaris
10 Sparc and Oracle 10.2.0.4.
We use the procedure described in UC for SAPNetWeaver 7.0 SP 14 and
higher. Export runs well without error
or problem in our db (1,6 TB of used space).
During import SAPinst show me a different, then source system,
tablespaces layout:
PSAPSR3
PSAPSR3700
PSAPSR3FACT
PSAPSR3ODS
PSAPSR3USR
SYSAUX
PSAPUNDO
PSAPTEMP
SYSTEM
But my soursce system was:
PSAPBTABD
PSAPBTABI
PSAPCLUD
PSAPCLUI
PSAPDDICD
PSAPDDICI
PSAPDIMD
PSAPDIMI
PSAPDOCUD
PSAPDOCUI
PSAPEL700D
PSAPEL700I
PSAPES700D
PSAPES700I
PSAPFACTD
PSAPFACTI
PSAPLOADD
PSAPLOADI
PSAPODSD
PSAPODSI
PSAPPOOLD
PSAPPOOLI
PSAPPROTD
PSAPPROTI
PSAPSOURCED
PSAPSOURCEI
PSAPSTABD
PSAPSTABI
PSAPTEMP
PSAPUNDO
PSAPUSER1D
PSAPUSER1I
PSAPZ***********
PSAPZ***********
PSAPZ***********
SYSAUX
SYSTEM
We have already read 425079, so, can we use source system layout?
can SAPinst use our previous tablespace layout during import? ... or do
we must it manualy?
Regards.Hi,
>It is far better that you create the target database using the new layout. The old tablespace layout with multiple tablespaces and >data/index separation is no longer adapted to modern environments, and a Unicode conversion gives you a unique opportunity to >switch to a more appropriate structure for your DB.
So... to do it: I leave standard tablespace (without create my old tablespace PSAPZ*******) and then enlarge enough to load our tables? ... do I modify any other file/script for the import?
Regards. -
Printing unicode characters in Java - help
Hi there,
I want to print out unicode characters through java programming language in windows system. For example, I want to print Devanagari characters. I found out that '\u0900' to '\u0975' represent devanagari characters. So I tried following,
out = new PrintStream(System.out, true, "UTF-8");
out.println('\u0911');
but they print characters like ��� and not the actual devanagari characters. Just to be more clear, devanagari script is used by Hindi, Nepali and similar languages.
If you knew about it and could give any suggestions, that would be very helpful.
Thanks in advance!priyankabhar wrote:
I am not sure, it is just a windows system and I am trying to print to the command line. Please suggest me how I can find out if my console supports it.Use the CHCP command to find out what code page your console uses. And as already suggested, Google is a good resource if you don't know what a "code page" is. -
Help converting between Java Dates and SQL Dates
Hey all,
I'm working on a JSP to allow a user to enter information about news articles into a mySQL database. I'm using text fields for most of the data, and most of it is transferred correctly when the user hits "Submit." However, I am having a problem with the date field of the mySQL database. Basically I'm trying to retrieve the current date from the JSP page, and then insert this into the date field of the appropriate table when the user hits submit. The problem is that I can't typecast a java.util.Date or even a java.util.Calendar to a java.sql.Date object. I've tried lots of approaches, including creating a new instance of java.util.Calendar, getting all its fields and concatenating them onto the date variable, but this doesn't work.
Anyone know how I could easily convert between java.util.Date or java.util.Calendar and java.sql.Date?
Thanks!Thanks for the help!
I can correctly display the current date on the page in java.sql.Date format now, but it's still not being inserted into the database correctly. The specific code is as follows:
java.util.Date dt = new java.util.Date();
java.sql.Date sqlDate = new java.sql.Date(dt.getTime());
(As you wrote)
Then (after connecting to the database etc.):
PreparedStatement pstmt = con.prepareStatement("INSERT INTO NEWS(NEWSDATE,DAYOFWEEK,AUTHOR,HEADLINE,CLIP,PUBLICATION,LINK,NEWSLOCATION,DATECREATED,DATEMODIFIED,CATEGORY,KEYWORDS,PHOTOURL,PHOTOGRAPHER,AUDIOURL) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
pstmt.clearParameters();
pstmt.setString(1,date);
pstmt.setString(2,dayofweek);
pstmt.setString(3,author);
pstmt.setString(4,headline);
pstmt.setString(5,clip);
pstmt.setString(6,publication);
pstmt.setString(7,link);
pstmt.setString(8,newslocation);
pstmt.setDate(9,sqlDate);
pstmt.setString(10,datemodified);
pstmt.setString(11,category);
pstmt.setString(12,keywords);
pstmt.setString(13,photoURL);
pstmt.setString(14,photographer);
pstmt.setString(15,audioURL);
int i = pstmt.executeUpdate();
pstmt.close();
All the other fields are retrieved with request.getParameter from text fields. Any idea why the DATECREATED field is being updated to all 0's but the others work fine?
Thanks again.
Maybe you are looking for
-
Trying to produce a java chat server
Would like produce a working client/server chat system, as basic as possible but able to listen and talk to each other. Any chat servers how-to examples I've come across never seem to work. Would like to understand why applets don't work when I open
-
Regarding multipal currencies entry in one transaction SAP ECC 6.0
HI SAP Experts I have question regarding Multiple Currencies entry. I got a quarry from user that if they can use Multiple currencies in General Entry posting. when they use F-50 for General entry posting. For Example If they have following details R
-
Bug at "refresh after update "
I have an EO, PK (CODPEDV,CODPROD), with two (CANT_APROB, CANT_PROG) attributes defined as "Refresh after Update" in the Attribute Settings of the EO, as they are being corrected by a Trigger on Update in the DB. all that is Ok; but, What if my updat
-
Hello, my copy of Dreamweaver CS4 stopped working, a message appears stating "Licensing for this product stopped working" error 150:30. I have a license I bought from Adobe directly, and which has always worked fine. Any hints? I have a new iMac Reti
-
I just bout a W520 and it acting werid recently. It will randomly log me out to the login screen for unkown reason. It log me out while i was typing, moving computer, watching video, closing the lid and also not doing anything. I have Lenovo autolock