C  « character « Java Data Type Q&A





1. JNI: How to pass "unsigned char* " from C++ to java    stackoverflow.com

I have a 'unsigned char *' and I want to pass it on to the Java code using JNI I have tried it in the following way

jstring test1;  
std::string str(reinterpret_cast<const char*>(ucptest)); ...

2. String Comparision without Special Character    stackoverflow.com

I have strings having special characters e.g.

 "ravi", "Ravi" ,"!ravi","ravi...","RaVi)" etc..
I want all these to be treated as same. How to achieve this. Can be in shell script, C,C++,JAVA. Thanks, Ravi.

3. Sign(+/-) error in byte in Java byte setting operations    stackoverflow.com

I am declearing in Java

public byte[] orbits = new byte[38];
Now if I am doing
orbits[24] = (byte)0xFF;
orbits[24] should get populated by 11111111 i.e FF(in hexadecimal) but instead its getting populated with -1. This ...

4. sending UTF chars to java from c++ using jni    stackoverflow.com

I want to send Hangul (Korean symbols using UTF) text from C to JAVA. But JAVA gets incorrect results Example:

JNIEXPORT jstring JNICALL Java_get_1term
  (JNIEnv *env, jobject, jint termInd)
{
 ...

5. communicate unsigned char from C++ to Java    forums.oracle.com

I am calling a Java native executable from a C++ program. I would like to communicate the red, green, and blue values of an image, which are unsigned chars in my C++ program (varying between 0 and 255) to my Java program. Unfortunately, chars in C++ are 1 byte and chars in Java are 2 bytes. What's a simple and fast ...